.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Net::Whois::RIPE 3pm" .TH Net::Whois::RIPE 3pm "2006-04-17" "perl v5.20.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::Whois::RIPE \- implementation of RIPE Whois. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Net::Whois::RIPE; \& \& $whois = Net::Whois::RIPE\->new($host); \& $whois = Net::Whois::RIPE\->new($host,Timeout=>10); \& $whois = Net::Whois::RIPE\->new($host,Timeout=>10,Port=>43); \& \& \& $whois\->no_recursive; \& $whois\->source(\*(AqAPNIC\*(Aq); \& $whois\->type(\*(Aqinetnum\*(Aq); \& \& foreach $inet ($whois\->query(\*(Aq203.203.203.203\*(Aq)) { \& print $inet\->inetnum, "\en"; \& } \& \& $whois\->query(\*(Aq202.12.28.0\*(Aq); \& $whois\->update($text); \& \& # to minimise memory requirements on large lookups... \& $iterator = $whois\->query_iterator(\*(AqDNS3\-AP\*(Aq); \& while ($obj = $iterator\->next) { \& ... \& } \& \& $whois\->template(\*(Aqinetnum\*(Aq); \& $whois\->verbose_template(\*(Aqinetnum\*(Aq); \& \& $whois\->debug(1); \& $whois\->max_read_size(1024); \& \& $whois\->search_all; # \-a \& $whois\->fast_raw; # \-F \& $whois\->find_less; # \-L \& $whois\->find_more; # \-m \& $whois\->find_all_more; # \-M \& $whois\->no_recursive; # \-r \& $whois\->no_referral; # \-R \& $whois\->no_sugar; # \-S \& $whois\->no_filtering; # \-B \& $whois\->no_grouping; # \-G \& \& $whois\->inverse_lookup($attribute); # \-i $attribute \& $whois\->source(\*(AqAPNIC\*(Aq); # \-s APNIC \& $whois\->type(\*(Aqperson\*(Aq); # \-T person \& \& # query only \& \& $whois\->port(); \& $whois\->server(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Net::Whois::RIPE class implementing a \s-1RIPE\s0 whois client. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .IP "\fBnew (\s-1HOST\s0 [,OPTIONS])\fR" 4 .IX Item "new (HOST [,OPTIONS])" This is the constructor for a new Net::Whois::RIPE object. \f(CW\*(C`HOST\*(C'\fR is the name of the remote host to which a whois connection is required. .Sp \&\f(CW\*(C`OPTIONS\*(C'\fR are passed in a hash like fashion, using key and value pairs. Possible options are: .Sp .Vb 3 \& Port \- The port number to connect to on the remote machine \& Timeout \- Set a timeout value in seconds (defaults to 30) \& Debug \- See debug methog. .Ve .Sp The constructor returns undef on failure. If \fBdebug\fR is on then a message is carped about the failure. .SH "METHODS" .IX Header "METHODS" .IP "\fBtemplate(\s-1WHOIS_OBJECT_NAME\s0)\fR" 4 .IX Item "template(WHOIS_OBJECT_NAME)" Sends a template request to whois host for a template of \s-1WHOIS_OBJECT_NAME.\s0 Results are returned in a \fINet::Whois::RIPE::Object\fR object. The template is retrieved via the \fIcontent\fR method on the \fINet::Whois::RIPE::Object\fR object. .Sp .Vb 4 \& $t = $whois\->template(\*(Aqall\*(Aq); \& $t = $whois\->template(\*(Aqinetnum\*(Aq); \& $t = $whois\->template(\*(Aqperson\*(Aq); \& $text = $t\->content; .Ve .Sp If \s-1WHOIS_OBJECT_NAME\s0 is undefined then the method will carp (under debug) and return undef. .IP "\fBverbose_template(\s-1WHOIS_OBJECT_NAME\s0)\fR" 4 .IX Item "verbose_template(WHOIS_OBJECT_NAME)" Like \fBtemplate\fR, but sends a verbose template request to the whois host for \&\s-1WHOIS_OBJECT_NAME.\s0 Results are returned in a \fINet::Whois::RIPE::Object\fR object. The verbose template is retrieved via the \fIcontent\fR method on the \&\fINet::Whois::RIPE::Object\fR object. .Sp .Vb 2 \& $vt = $whois\->verbose_template(\*(Aqperson\*(Aq); \& $text = $vt\->content; .Ve .Sp If \s-1WHOIS_OBJECT_NAME\s0 is undefined then the method will carp and return undef. .IP "\fBquery(\s-1QUERY_TEXT\s0)\fR" 4 .IX Item "query(QUERY_TEXT)" Formats query flag options (see below) and sends them and \s-1QUERY_TEXT\s0 to the server. If called in a scalar context then the first object returned from the server is passed back as a single \fINet::Whois::RIPE::Object\fR object. In an array context, all returned objects returned from the server are parsed into in a list and returned (potentially quite large). .Sp .Vb 2 \& $q = $whois\->query(\*(Aqkey\*(Aq) # a single Query \& @q = $whois\->query(\*(Aqkey\*(Aq) # an array of Queries .Ve .Sp If \s-1QUERY_KEY\s0 is undefined, undef is returned. Any failure will carp and return undef. .Sp If \fBmax_read_size\fR is greater than zero then the server response will be abandoned when greater than max_read_size bytes have been read. The last object read will have warning messages set to indicate that the response was cut. .IP "\fBquery_iterator(\s-1QUERY_TEXT\s0)\fR" 4 .IX Item "query_iterator(QUERY_TEXT)" Similar to \fIquery\fR except that a Net::Whois::RIPE::Iterator object is returned. This object is used to iterate over the results of the query. .Sp This was created in response to huge results returned by whois queries where over 1000 objects may be returned. Query iterator returns an object at a time via the \fInext\fR method as opposed to \fIquery\fR which returns an array of objects. .Sp .Vb 5 \& $iterator = $whois\->query_iterator \& or die "unable to create iterator"; \& while ($obj = $iterator\->next) { \& ... \& } .Ve .IP "\fBupdate(\s-1UPDATE_TEXT\s0)\fR" 4 .IX Item "update(UPDATE_TEXT)" Sends \s-1UPDATE_TEXT\s0 directly to server. Query flag options (below) are not used by update. Server response is returned via \fINet::Whois::RIPE::Object\fR. Use the \&\fBcontent\fR method on the Query object to via server response. .Sp .Vb 2 \& my $q = $whois\->update($message) \& print $q\->content .Ve .Sp If \s-1UPDATE_TEXT\s0 is undefined, undef is returned. Any failure will carp and return undef. .Sp If no \fIchanged\fR field can be found to determine a login and domain the method will carp and return undef. .Sp If \fBmax_read_size\fR is greater than zero then the server response will be abandoned when greater than max_read_size bytes have been read. .IP "\fBdebug(\s-1LEVEL\s0)\fR" 4 .IX Item "debug(LEVEL)" Sets/gets debugging level on the class or an object. .Sp .Vb 3 \& 0 \- no debugging \& 1 \- debugging on \& 2 \- carp on IO::Socket::INET .Ve .IP "\fBmax_read_size([\s-1INTEGER\s0])\fR" 4 .IX Item "max_read_size([INTEGER])" Sets/reads the maximum number of bytes that \fINet::Whois::RIPE\fR will read before returning. This is to limit huge responses from the server overloading scripts. .Sp a \fImax_read_size\fR of zero indicates \fBno\fR limit. .IP "\fBflag options\fR" 4 .IX Item "flag options" The following flags may be set by calling the method. Their meaning is identical to the ripe whois client. These flags require no arguments, they simply set the flag on. .Sp .Vb 1 \& Method Equivalent whois flag \& \& search_all \-a \& fast_raw \-F \& find_less \-L \& find_more \-m \& find_all_more \-M \& no_recursive \-r \& no_referral \-R \& no_sugar \-S \& no_filtering \-B \& no_grouping \-G .Ve .IP "\fBflag options taking values\fR" 4 .IX Item "flag options taking values" The following flags may be set by calling the method with a value. There meaning is identical to the ripe whois client. .Sp .Vb 1 \& Method Equivalent whois flag \& \& inverse_lookup(ATTRIBUTE) \-i ATTRIBUTE \& port(PORT) \-p PORT \& source(SOURCE) \-s SOURCE \& type(TYPE) \-T TYPE .Ve .SH "AUTHOR" .IX Header "AUTHOR" .Vb 3 \& Paul Gampe, \& Kevin Baker, \& Bruce Campbell, .Ve .SH "TODO" .IX Header "TODO" Update could be made clever enough to determine if it was been passed a string to update or a Net::Whois::RIPE::Object and adapt its behaviour. .SH "SEE ALSO" .IX Header "SEE ALSO" .Vb 4 \& Net::Whois::RIPE::Iterator \& Net::Whois::RIPE::Object \& Net::Whois::RIPE::Object::Template \& http://www.ripe.net/db/about.html .Ve .SH "COPYRIGHT" .IX Header "COPYRIGHT" .Vb 3 \& Copyright (C) 1998 Paul Gampe and APNIC Pty. Ltd. \& Copyright (C) 2000 Kevin Baker and APNIC Pty. Ltd. \& Copyright (C) 2004\-2005 Paul Gampe \& \& This program is free software; you can redistribute it \& and/or modify it under the terms of the GNU General Public \& License as published by the Free Software Foundation; \& either version 1, or (at your option) any later version. \& \& This program is distributed in the hope that it will be useful, \& but WITHOUT ANY WARRANTY; without even the implied warranty of \& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \& GNU General Public License for more details. \& \& You should have received a copy of the GNU General Public \& License along with this program; if not, write to the \& Free Software Foundation, Inc., \& 675 Mass Ave, Cambridge, MA 02139, USA. .Ve