.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" 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 >0, 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "NNTPClient 3pm" .TH NNTPClient 3pm "2018-07-07" "perl v5.26.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" News::NNTPClient \- Perl 5 module to talk to NNTP (RFC977) server .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use News::NNTPClient; \& \& $c = new News::NNTPClient; \& $c = new News::NNTPClient($server); \& $c = new News::NNTPClient($server, $port); \& $c = new News::NNTPClient($server, $port, $debug); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module implements a client interface to \s-1NNTP,\s0 enabling a Perl 5 application to talk to \s-1NNTP\s0 servers. It uses the \s-1OOP\s0 (Object Oriented Programming) interface introduced with Perl 5. .PP NNTPClient exports nothing. .PP A new NNTPClient object must be created with the \fInew\fR method. Once this has been done, all \s-1NNTP\s0 commands are accessed through this object. .PP Here are a couple of short examples. The first prints all articles in the \*(L"test\*(R" newsgroup: .PP .Vb 1 \& #!/usr/local/bin/perl \-w \& \& use News::NNTPClient; \& \& $c = new News::NNTPClient; \& \& ($first, $last) = ($c\->group("test")); \& \& for (; $first <= $last; $first++) { \& print $c\->article($first); \& } \& \& _\|_END_\|_ .Ve .PP This example prints the body of all articles in the \*(L"test\*(R" newsgroup newer than one hour: .PP .Vb 1 \& #!/usr/local/bin/perl \-w \& \& require News::NNTPClient; \& \& $c = new News::NNTPClient; \& \& foreach ($c\->newnews("test", time \- 3600)) { \& print $c\->body($_); \& } \& \& _\|_END_\|_ .Ve .SS "NNTPClient Commands" .IX Subsection "NNTPClient Commands" These commands are used to manipulate the NNTPClient object, and aren't directly related to commands available on any \s-1NNTP\s0 server. .IP "\fInew\fR" 10 .IX Item "new" Use this to create a new \s-1NNTP\s0 connection. It takes three arguments, a hostname, a port and a debug flag. It calls \fIinitialize\fR. Use an empty argument to specify defaults. .Sp If port is omitted or blank ("\*(L"), looks for environment variable \&\s-1NNTPPORT,\s0 service \*(R"nntp", or uses 119. .Sp If host is omitted or empty ("\*(L"), looks for environment variable \&\s-1NNTPSERVER\s0 or uses \*(R"news". .Sp Examples: .Sp .Vb 8 \& $c = new News::NNTPClient; \&or \& $c = new News::NNTPClient("newsserver.some.where"); \&or \& $c = new News::NNTPClient("experimental", 9999); \&or \& # Specify debug but use defaults. \& $c = new News::NNTPClient("", "", 2); .Ve .Sp Returns a blessed reference, representing a new \s-1NNTP\s0 connection. .IP "\fIinitialize\fR" 10 .IX Item "initialize" Calls \fIport\fR, \fIhost\fR, \fIconnect\fR, and \fIresponse\fR, in that order. If any of these fail, initialization is aborted. .IP "\fIconnect\fR" 10 .IX Item "connect" Connects to current host/port. Not normally needed, as the \fInew\fR method does this for you. Closes any existing connection. Sets the posting status. See the \fIpostok\fR method. .IP "\fIhost\fR" 10 .IX Item "host" Sets the host that will be used on the next connect. Not normally needed, as the \fInew\fR method does this for you. .Sp Without an argument, returns current host. .Sp Argument can be hostname or dotted quad, for example, \*(L"15.2.174.218\*(R". .Sp Returns fully qualified host name. .IP "\fIport\fR" 10 .IX Item "port" Sets the port that will be used on the next connect. Not normally needed, as the \fInew\fR method does this for you. .Sp Without an argument, returns current port. .Sp Argument can be port number or name. If it is a name, it must be a valid service. .Sp Returns port number. .IP "\fIdebug\fR" 10 .IX Item "debug" Sets the debug level. .Sp Without an argument, returns current debug level. .Sp There are currently three debug levels. Level 0, level 1, and level 2. .Sp At level 0 the messages described for level 1 are not produced. Debug level 0 is a way of turning off messages produced by the default debug level 1. Serious error messages, such as \s-1EOF\s0 (End Of File) on the file handle, are still produced. .Sp At level 1, any \s-1NNTP\s0 command that results in a result code of 400 or greater prints a warning message. This is the default. .Sp At level 2, in addition to level 1 messages, status messages are printed to indicate actions taking place. .Sp Returns old debug value. .IP "\fIok\fR" 10 .IX Item "ok" Returns boolean status of most recent command. \s-1NNTP\s0 return codes less than 400 are considered \s-1OK.\s0 Not often needed as most commands return false upon failure anyway. .IP "\fIokprint\fR" 10 .IX Item "okprint" Returns boolean status of most recent command. \s-1NNTP\s0 return codes less than 400 are considered \s-1OK.\s0 Prints an error message for return codes of 400 or greater unless debug level is set to zero (0). .Sp This method is used internally by most commands, and could be considered to be \*(L"for internal use only\*(R". You should use the return status of commands directly to determine pass-fail, or if needed the \&\fIok\fR method can be used to check status later. .IP "\fImessage\fR" 10 .IX Item "message" Returns the \s-1NNTP\s0 response message of the most recent command. .Sp Example, as returned by \s-1NNTP\s0 server version 1.5.11t: .Sp .Vb 2 \& $c\->slave; \& print $c\->message; \& \& Kinky, kinky. I don\*(Aqt support such perversions. .Ve .IP "\fIcode\fR" 10 .IX Item "code" Returns the \s-1NNTP\s0 response code of the most recent command. .Sp Example: .Sp .Vb 2 \& $c\->article(1); \& print $c\->code, "\en"; \& \& 412 .Ve .IP "\fIpostok\fR" 10 .IX Item "postok" Returns the post-ability status that was reported upon connection or after the mode_reader command. .IP "\fIeol\fR" 10 .IX Item "eol" Sets the End-Of-Line termination for text returned from the server. .Sp Returns the old \s-1EOL\s0 value. .Sp Default is \en. .Sp To set \s-1EOL\s0 to nothing, pass it the empty string. .Sp To query current \s-1EOL\s0 without setting it, call with no arguments. .Sp Example: .Sp .Vb 4 \& $old_eol = $c\->eol(); # Get original. \& $c\->eol(""); # Set EOL to nothing. \& @article = $c\->article(); # Fetch an article. \& $c\->eol($old_eol); # Restore value. .Ve .IP "\fIgmt\fR" 10 .IX Item "gmt" Sets \s-1GMT\s0 mode. Returns old value. To query \s-1GMT\s0 mode without setting it, call with no arguments. .Sp A true value means that \s-1GMT\s0 mode is used in the \fInewgroups\fR and \&\fInewnews\fR functions. A false value means that local time is used. .IP "\fIfourdigityear\fR" 10 .IX Item "fourdigityear" Sets four digit year mode. Returns old value. To query four digit year mode without setting it, call with no arguments. .Sp A true value means that four digit years are used in the \fInewgroups\fR and \fInewnews\fR functions. A false value means that an \s-1RFC977\s0 compliant two digit year is used. .Sp This function is available for news servers that implemented four digit years rather than deal with non\-y2k compliment two digit years. \&\s-1RFC977\s0 does not allow four digit years, and instead chooses the century closest. I quote: .Sp .Vb 2 \& The closest century is assumed as part of the year (i.e., 86 \& specifies 1986, 30 specifies 2030, 99 is 1999, 00 is 2000). .Ve .IP "\fIversion\fR" 10 .IX Item "version" Returns version number. .Sp This document represents @(#) \f(CW$Revision:\fR 0.37 $. .SS "\s-1NNTP\s0 Commands" .IX Subsection "NNTP Commands" These commands directly correlate to \s-1NNTP\s0 server commands. They return a false value upon failure, true upon success. The truth value is usually some bit of useful information. For example, the \fIstat\fR command returns Message-ID if it is successful. .PP Some commands return multiple lines. These lines are returned as an array in array context, and as a reference to an array in scalar context. For example, if you do this: .PP .Vb 1 \& @lines = $c\->article(14); .Ve .PP then \f(CW@lines\fR will contain the article, one line per array element. However, if you do this: .PP .Vb 1 \& $lines = $c\->article(14); .Ve .PP then \f(CW$lines\fR will contain a \fIreference\fR to an array. This feature is for those that don't like passing arrays from routine to routine. .IP "\fImode_reader\fR" 10 .IX Item "mode_reader" Some servers require this command to process \s-1NNTP\s0 client commands. Sets postok status. See \fIpostok\fR. .Sp Returns \s-1OK\s0 status. .IP "\fIarticle\fR" 10 .IX Item "article" Retrieves an article from the server. This is the main command for fetching articles. Expects a single argument, an article number or Message-ID. If you use an article number, you must be in a news group. See \fIgroup\fR. .Sp Returns the header, a separating blank line, and the body of the article as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .Sp Examples: .Sp .Vb 1 \& print $c\->article(\*(Aq\*(Aq); \& \& $c\->group("test"); \& \& print $c\->article(99); .Ve .IP "\fIbody\fR" 10 .IX Item "body" Expects a single argument, an article number or Message-ID. .Sp Returns the body of an article as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .Sp See \fIarticle\fR. .IP "\fIhead\fR" 10 .IX Item "head" Expects a single argument, an article number or Message-ID. .Sp Returns the head of the article as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .Sp See \fIarticle\fR. .IP "\fIstat\fR" 10 .IX Item "stat" Expects a single argument, an article number or Message-ID. .Sp The \s-1STAT\s0 command is like the \s-1ARTICLE\s0 command except that it does not return any text. It can be used to set the \*(L"current article pointer\*(R" if passed an article number, or to validate a Message-ID if passed a Message-ID. .Sp Returns Message-ID if successful, otherwise returns false. .IP "\fIlast\fR" 10 .IX Item "last" The \*(L"current article pointer\*(R" maintained by the server is moved to the previous article in the current news group. .Sp Returns Message-ID if successful, otherwise returns false. .IP "\fInext\fR" 10 .IX Item "next" The \*(L"current article pointer\*(R" maintained by the server is moved to the next article in the current news group. .Sp Returns Message-ID if successful, otherwise returns false. .IP "\fIgroup\fR" 10 .IX Item "group" Expects a single argument, the name of a valid news group. .Sp This command sets the current news group as maintained by the server. It also sets the server maintained \*(L"current article pointer\*(R" to the first article in the group. This enables the use of certain other server commands, such as \fIarticle\fR, \fIhead\fR, \fIbody\fR, \fIstat\fR, \&\fIlast\fR, and \fInext\fR. Also sets the current group in the NNTPClient object, which is used by the \fInewnews\fR and \fIxindex\fR commands. .Sp Returns (first, last) in list context, or \*(L"first-last\*(R" in scalar context, where first and last are the first and last article numbers as reported by the group command. Returns false if there is an error. .Sp It is an error to attempt to select a non-existent news group. .Sp If the estimated article count is needed, it can be extracted from the message. See \fImessage\fR. .IP "\fIlist\fR" 10 .IX Item "list" Accepts two optional arguments. The first can be used indicate the type of list desired. List type depends on server. The second is a pattern that is use by some list types. .Sp Examples: .Sp .Vb 4 \& print $c\->list(); \& print $c\->list(\*(Aqactive\*(Aq); \& print $c\->list(\*(Aqactive\*(Aq, \*(Aqlocal.*\*(Aq); \& print $c\->list(\*(Aqnewsgroups\*(Aq); .Ve .Sp With an argument of \*(L"active\*(R" or with no arguments, this command returns a list of valid newsgroups and associated information. The format is: .Sp .Vb 1 \& group last first p .Ve .Sp where group is the news group name, last is the article number of the last article, first is the article number of the first article, and p is flag indicating if posting is allowed. A 'y' flag is an indication that posting is allowed. .Sp Other possible arguments are: newsgroups, distributions, subscriptions for B\-News, and active.times, distributions, distrib.pats, newsgroups, overview.fmt for \s-1INN.\s0 .Sp Returns an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .IP "\fInewgroups\fR" 10 .IX Item "newgroups" Expects at least one argument representing the date/time in seconds, or in \*(L"YYYYMMDD HHMMSS [\s-1GMT\s0]\*(R" format. The \s-1GMT\s0 part is optional. If you wish to use \s-1GMT\s0 with the seconds format, first call \fIgmt\fR. Remaining arguments are used as distributions. .Sp Example, print all new groups in the \*(L"comp\*(R" and/or \*(L"news\*(R" hierarchy as of one hour ago: .Sp .Vb 1 \& print $c\->newgroups(time() \- 3600, "comp", "news"); .Ve .Sp Returns list of new news group names as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .IP "\fInewnews\fR" 10 .IX Item "newnews" Expects one, two, or more arguments. .Sp If the first argument is a group name, it looks for new news in that group, and the date/time is the second argument. If the first argument represents the date/time in seconds or in \*(L"\s-1YYYYMMDD HHMMSS\s0 [\s-1GMT\s0]\*(R" format, then the group is is last group set via the \fIgroup\fR command. If no \fIgroup\fR command has been issued then the group is \*(L"*\*(R", representing all groups. If you wish to use \s-1GMT\s0 in seconds format for the time, first call \fIgmt\fR. Remaining arguments are use to restrict search to certain distribution(s). .Sp Returns a list of Message-IDs of articles that have been posted or received since the specified time. .Sp Examples: .Sp .Vb 11 \& # Hour old news in news group "test". \& $c\->newnews("test", time() \- 3600); \&or \& # Hour old in all groups. \& $c\->newnews(time() \- 3600); \&or \& $c\->newnews("*", time() \- 3600); \&or \& # Hour old news in news group "test". \& $c\->group("test"); \& $c\->newnews(time() \- 3600); .Ve .Sp The group argument can include an asterisk \*(L"*\*(R" to specify a range news groups. It can also include multiple news groups, separated by a comma \*(L",\*(R". .Sp Example: .Sp .Vb 1 \& $c\->newnews("comp.*.sources,alt.sources", time() \- 3600); .Ve .Sp An exclamation point \*(L"!\*(R" may be used to negate the selection of certain groups. .Sp Example: .Sp .Vb 1 \& $c\->newnews("*sources*,!*.d,!*.wanted", time() \- 3600); .Ve .Sp Any additional distribution arguments will be concatenated together and send as a distribution list. The distribution list will limit articles to those that have a Distribution: header containing one of the distributions passed. .Sp Example: .Sp .Vb 1 \& $c\->newnews("*", time() \- 3600, "local", "na"); .Ve .Sp Returns Message-IDs of new articles as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .IP "\fIhelp\fR" 10 .IX Item "help" Returns any server help information. The format of the information is highly dependent on the server, but usually contains a list of \s-1NNTP\s0 commands recognized by the server. .Sp Returns an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .IP "\fIpost\fR" 10 .IX Item "post" Post an article. Expects data to be posted as an array of lines. Most servers expect, at a minimum, Newsgroups and Subject headers. Be sure to separate the header from the body with a neck, er blank line. .Sp Example: .Sp .Vb 2 \& @header = ("Newsgroups: test", "Subject: test", "From: tester"); \& @body = ("This is the body of the article"); \& \& $c\->post(@header, "", @body); .Ve .Sp There aren't really three arguments. Perl folds all arguments into a single list. You could also do this: .Sp .Vb 2 \& @article = ("Newsgroups: test", "Subject: test", "From: tester", "", "Body"); \& $c\->post(@article); .Ve .Sp or even this: .Sp .Vb 1 \& $c\->post("Newsgroups: test", "Subject: test", "From: tester", "", "Body"); .Ve .Sp Any \*(L"\en\*(R" characters at the end of a line will be trimmed. .Sp Returns status. .IP "\fIihave\fR" 10 .IX Item "ihave" Transfer an article. Expects an article Message-ID and the article to be sent as an array of lines. .Sp Example: .Sp .Vb 2 \& # Fetch article from server on $c \& @article = $c\->article($artid); \& \& # Send to server on $d \& if ($d\->ihave($artid, @article)) { \& print "Article transfered\en"; \& } else { \& print "Article rejected: ", $d\->message, "\en"; \& } .Ve .IP "\fIslave\fR" 10 .IX Item "slave" Doesn't do anything on most servers. Included for completeness. .IP "\fI\s-1DESTROY\s0\fR" 10 .IX Item "DESTROY" This method is called whenever the the object created by News::NNTPClient::new is destroyed. It calls \fIquit\fR to close the connection. .IP "\fIquit\fR" 10 .IX Item "quit" Send the \s-1NNTP\s0 quit command and close the connection. The connection can be then be re-opened with the connect method. Quit will automatically be called when the object is destroyed, so there is no need to explicitly call \fIquit\fR before exiting your program. .SS "Extended \s-1NNTP\s0 Commands" .IX Subsection "Extended NNTP Commands" These commands also directly correlate \s-1NNTP\s0 server commands, but are not mentioned in \s-1RFC977,\s0 and are not part of the standard. However, many servers implement them, so they are included as part of this package for your convenience. If a command is not recognized by a server, the server usually returns code 500, command unrecognized. .IP "\fIauthinfo\fR" 10 .IX Item "authinfo" Expects two arguments, user and password. .IP "\fIdate\fR" 10 .IX Item "date" Returns server date in \*(L"YYYYMMDDhhmmss\*(R" format. .IP "\fIlistgroup\fR" 10 .IX Item "listgroup" Expects one argument, a group name. Default is current group. .Sp Returns article numbers as an array of lines terminated by the current \&\s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .IP "\fIxmotd\fR" 10 .IX Item "xmotd" Expects one argument of unix time in seconds or as a string in the form \*(L"\s-1YYYYMMDD HHMMSS\*(R".\s0 .Sp Returns the news servers \*(L"Message Of The Day\*(R" as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .Sp For example, the following will always print the message of the day, if there is any: .Sp .Vb 2 \& print $c\->xmotd(1); \& NNTP Server News2 \& \& News administrator is Joseph Blough .Ve .IP "\fIxgtitle\fR" 10 .IX Item "xgtitle" Expects one argument of a group pattern. Default is current group. .Sp Returns group titles an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .Sp Example: .Sp .Vb 1 \& print $c\->xgtitle("bit.listserv.v*"); \& \& bit.listserv.valert\-l Virus Alert List. (Moderated) \& bit.listserv.vfort\-l VS\-Fortran Discussion List. \& bit.listserv.vm\-util VM Utilities Discussion List. \& bit.listserv.vmesa\-l VM/ESA Mailing List. \& bit.listserv.vmslsv\-l VAX/VMS LISTSERV Discussion List. \& bit.listserv.vmxa\-l VM/XA Discussion List. \& bit.listserv.vnews\-l VNEWS Discussion List. \& bit.listserv.vpiej\-l Electronic Publishing Discussion .Ve .IP "\fIxpath\fR" 10 .IX Item "xpath" Expects one argument of an article Message-ID. Returns the path name of the file on the server. .Sp Example: .Sp .Vb 2 \& print print $c\->xpath(q(<43bq5l$7b5@news.dtc.hp.com>))\*(Aq \& hp/test/4469 .Ve .IP "\fIxhdr\fR" 10 .IX Item "xhdr" Fetch header for a range of articles. First argument is name of header to fetch. If omitted or blank, default to Message-ID. Second argument is start of article range. If omitted, defaults to 1. Third argument is end of range. If omitted, defaults to "". The second argument can also be a Message-ID. .Sp Returns headers as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .Sp Examples: .Sp .Vb 2 \& # Fetch Message\-ID of article 1. \& $c\->xhdr(); \& \& # Fetch Subject of article 1. \& $c\->xhdr("Subject"); \& \& # Fetch Subject of article 3345. \& $c\->xhdr("Subject", 3345); \& \& # Fetch Subjects of articles 3345\-9873 \& $c\->xhdr("Subject", 3345, 9873); \& \& # Fetch Message\-ID of articles 3345\-9873 \& $c\->xhdr("", 3345,9873); \& \& # Fetch Subject for article with Message\-ID \& $c\->xhdr("Subject", \*(Aq<797t0g$25f10@foo.com>\*(Aq); .Ve .IP "\fIxpat\fR" 10 .IX Item "xpat" Fetch header for a range of articles matching one or more patterns. First argument is name of header to fetch. If omitted or blank, default to Subject. Second argument is start of article range. If omitted, defaults to 1. Next argument is end of range. Remaining arguments are patterns to match. Some servers use \*(L"*\*(R" for wildcard. .Sp Returns headers as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .Sp Examples: .Sp .Vb 2 \& # Fetch Subject header of article 1. \& $c\->xpat(); \& \& # Fetch "From" header of article 1. \& $c\->xpat("From"); \& \& # Fetch "From" of article 3345. \& $c\->xpat("From", 3345); \& \& # Fetch "From" of articles 3345\-9873 matching *foo* \& $c\->xpat("From", 3345, 9873, "*foo*"); \& \& # Fetch "Subject" of articles 3345\-9873 matching \& # *foo*, *bar*, *and*, *stuff* \& $c\->xpat("", 3345,9873, qw(*foo* *bar* *and* *stuff*)); .Ve .IP "\fIxover\fR" 10 .IX Item "xover" Expects an article number or a starting and ending article number representing a range of articles. .Sp Returns overview information for each article as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .Sp Xover generally returns items separated by tabs. Here is an example that prints out the xover fields from all messages in the \*(L"test\*(R" news group. .Sp .Vb 1 \& #!/usr/local/bin/perl \& \& require News::NNTPClient; \& \& $c = new News::NNTPClient; \& \& @fields = qw(numb subj from date mesg refr char line xref); \& \& foreach $xover ($c\->xover($c\->group("test"))) { \& %fields = (); \& @fields{@fields} = split /\et/, $xover; \& print map { "$_: $fields{$_}\en" } @fields; \& print "\en"; \& } \& \& _\|_END_\|_ \& # \&=item I .Ve .Sp Expects zero or one argument. Value of argument doesn't matter. If present, \fIdbinit\fR command is sent. If absent, \fIthread\fR command is sent. .Sp Returns binary data as a scalar value. .Sp Format of data returned is unknown at this time. .IP "\fIxindex\fR" 10 .IX Item "xindex" Expects one argument, a group name. If omitted, defaults to the group set by last \fIgroup\fR command. If there hasn't been a group command, it returns an error; .Sp Returns index information for group as an array of lines terminated by the current \s-1EOL.\s0 .Sp In scalar context a reference to the array is returned instead of the array itself. .IP "\fIxsearch\fR" 10 .IX Item "xsearch" Expects a query as an array of lines which are sent to the server, much like post. Returns the result of the search as an array of lines or a reference to same. .Sp Format of query is unknown at this time. .SH "AUTHOR" .IX Header "AUTHOR" Rodger Anderson .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 1995 Rodger Anderson. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.