Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "Net::NNTP 3" | |
132 | .TH Net::NNTP 3 "2001-09-21" "perl v5.8.8" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | Net::NNTP \- NNTP Client class | |
135 | .SH "SYNOPSIS" | |
136 | .IX Header "SYNOPSIS" | |
137 | .Vb 1 | |
138 | \& use Net::NNTP; | |
139 | .Ve | |
140 | .PP | |
141 | .Vb 2 | |
142 | \& $nntp = Net::NNTP->new("some.host.name"); | |
143 | \& $nntp->quit; | |
144 | .Ve | |
145 | .SH "DESCRIPTION" | |
146 | .IX Header "DESCRIPTION" | |
147 | \&\f(CW\*(C`Net::NNTP\*(C'\fR is a class implementing a simple \s-1NNTP\s0 client in Perl as described | |
148 | in \s-1RFC977\s0. \f(CW\*(C`Net::NNTP\*(C'\fR inherits its communication methods from \f(CW\*(C`Net::Cmd\*(C'\fR | |
149 | .SH "CONSTRUCTOR" | |
150 | .IX Header "CONSTRUCTOR" | |
151 | .IP "new ( [ \s-1HOST\s0 ] [, \s-1OPTIONS\s0 ])" 4 | |
152 | .IX Item "new ( [ HOST ] [, OPTIONS ])" | |
153 | This is the constructor for a new Net::NNTP object. \f(CW\*(C`HOST\*(C'\fR is the | |
154 | name of the remote host to which a \s-1NNTP\s0 connection is required. If not | |
155 | given then it may be passed as the \f(CW\*(C`Host\*(C'\fR option described below. If no host is passed | |
156 | then two environment variables are checked, first \f(CW\*(C`NNTPSERVER\*(C'\fR then | |
157 | \&\f(CW\*(C`NEWSHOST\*(C'\fR, then \f(CW\*(C`Net::Config\*(C'\fR is checked, and if a host is not found | |
158 | then \f(CW\*(C`news\*(C'\fR is used. | |
159 | .Sp | |
160 | \&\f(CW\*(C`OPTIONS\*(C'\fR are passed in a hash like fashion, using key and value pairs. | |
161 | Possible options are: | |
162 | .Sp | |
163 | \&\fBHost\fR \- \s-1NNTP\s0 host to connect to. It may be a single scalar, as defined for | |
164 | the \f(CW\*(C`PeerAddr\*(C'\fR option in IO::Socket::INET, or a reference to | |
165 | an array with hosts to try in turn. The \*(L"host\*(R" method will return the value | |
166 | which was used to connect to the host. | |
167 | .Sp | |
168 | \&\fBTimeout\fR \- Maximum time, in seconds, to wait for a response from the | |
169 | \&\s-1NNTP\s0 server, a value of zero will cause all \s-1IO\s0 operations to block. | |
170 | (default: 120) | |
171 | .Sp | |
172 | \&\fBDebug\fR \- Enable the printing of debugging information to \s-1STDERR\s0 | |
173 | .Sp | |
174 | \&\fBReader\fR \- If the remote server is \s-1INN\s0 then initially the connection | |
175 | will be to nnrpd, by default \f(CW\*(C`Net::NNTP\*(C'\fR will issue a \f(CW\*(C`MODE READER\*(C'\fR command | |
176 | so that the remote server becomes innd. If the \f(CW\*(C`Reader\*(C'\fR option is given | |
177 | with a value of zero, then this command will not be sent and the | |
178 | connection will be left talking to nnrpd. | |
179 | .SH "METHODS" | |
180 | .IX Header "METHODS" | |
181 | Unless otherwise stated all methods return either a \fItrue\fR or \fIfalse\fR | |
182 | value, with \fItrue\fR meaning that the operation was a success. When a method | |
183 | states that it returns a value, failure will be returned as \fIundef\fR or an | |
184 | empty list. | |
185 | .IP "article ( [ MSGID|MSGNUM ], [\s-1FH\s0] )" 4 | |
186 | .IX Item "article ( [ MSGID|MSGNUM ], [FH] )" | |
187 | Retrieve the header, a blank line, then the body (text) of the | |
188 | specified article. | |
189 | .Sp | |
190 | If \f(CW\*(C`FH\*(C'\fR is specified then it is expected to be a valid filehandle | |
191 | and the result will be printed to it, on success a true value will be | |
192 | returned. If \f(CW\*(C`FH\*(C'\fR is not specified then the return value, on success, | |
193 | will be a reference to an array containg the article requested, each | |
194 | entry in the array will contain one line of the article. | |
195 | .Sp | |
196 | If no arguments are passed then the current article in the currently | |
197 | selected newsgroup is fetched. | |
198 | .Sp | |
199 | \&\f(CW\*(C`MSGNUM\*(C'\fR is a numeric id of an article in the current newsgroup, and | |
200 | will change the current article pointer. \f(CW\*(C`MSGID\*(C'\fR is the message id of | |
201 | an article as shown in that article's header. It is anticipated that the | |
202 | client will obtain the \f(CW\*(C`MSGID\*(C'\fR from a list provided by the \f(CW\*(C`newnews\*(C'\fR | |
203 | command, from references contained within another article, or from the | |
204 | message-id provided in the response to some other commands. | |
205 | .Sp | |
206 | If there is an error then \f(CW\*(C`undef\*(C'\fR will be returned. | |
207 | .IP "body ( [ MSGID|MSGNUM ], [\s-1FH\s0] )" 4 | |
208 | .IX Item "body ( [ MSGID|MSGNUM ], [FH] )" | |
209 | Like \f(CW\*(C`article\*(C'\fR but only fetches the body of the article. | |
210 | .IP "head ( [ MSGID|MSGNUM ], [\s-1FH\s0] )" 4 | |
211 | .IX Item "head ( [ MSGID|MSGNUM ], [FH] )" | |
212 | Like \f(CW\*(C`article\*(C'\fR but only fetches the headers for the article. | |
213 | .IP "articlefh ( [ MSGID|MSGNUM ] )" 4 | |
214 | .IX Item "articlefh ( [ MSGID|MSGNUM ] )" | |
215 | .PD 0 | |
216 | .IP "bodyfh ( [ MSGID|MSGNUM ] )" 4 | |
217 | .IX Item "bodyfh ( [ MSGID|MSGNUM ] )" | |
218 | .IP "headfh ( [ MSGID|MSGNUM ] )" 4 | |
219 | .IX Item "headfh ( [ MSGID|MSGNUM ] )" | |
220 | .PD | |
221 | These are similar to \fIarticle()\fR, \fIbody()\fR and \fIhead()\fR, but rather than | |
222 | returning the requested data directly, they return a tied filehandle | |
223 | from which to read the article. | |
224 | .IP "nntpstat ( [ MSGID|MSGNUM ] )" 4 | |
225 | .IX Item "nntpstat ( [ MSGID|MSGNUM ] )" | |
226 | The \f(CW\*(C`nntpstat\*(C'\fR command is similar to the \f(CW\*(C`article\*(C'\fR command except that no | |
227 | text is returned. When selecting by message number within a group, | |
228 | the \f(CW\*(C`nntpstat\*(C'\fR command serves to set the \*(L"current article pointer\*(R" without | |
229 | sending text. | |
230 | .Sp | |
231 | Using the \f(CW\*(C`nntpstat\*(C'\fR command to | |
232 | select by message-id is valid but of questionable value, since a | |
233 | selection by message-id does \fBnot\fR alter the \*(L"current article pointer\*(R". | |
234 | .Sp | |
235 | Returns the message-id of the \*(L"current article\*(R". | |
236 | .IP "group ( [ \s-1GROUP\s0 ] )" 4 | |
237 | .IX Item "group ( [ GROUP ] )" | |
238 | Set and/or get the current group. If \f(CW\*(C`GROUP\*(C'\fR is not given then information | |
239 | is returned on the current group. | |
240 | .Sp | |
241 | In a scalar context it returns the group name. | |
242 | .Sp | |
243 | In an array context the return value is a list containing, the number | |
244 | of articles in the group, the number of the first article, the number | |
245 | of the last article and the group name. | |
246 | .IP "ihave ( \s-1MSGID\s0 [, \s-1MESSAGE\s0 ])" 4 | |
247 | .IX Item "ihave ( MSGID [, MESSAGE ])" | |
248 | The \f(CW\*(C`ihave\*(C'\fR command informs the server that the client has an article | |
249 | whose id is \f(CW\*(C`MSGID\*(C'\fR. If the server desires a copy of that | |
250 | article, and \f(CW\*(C`MESSAGE\*(C'\fR has been given the it will be sent. | |
251 | .Sp | |
252 | Returns \fItrue\fR if the server desires the article and \f(CW\*(C`MESSAGE\*(C'\fR was | |
253 | successfully sent,if specified. | |
254 | .Sp | |
255 | If \f(CW\*(C`MESSAGE\*(C'\fR is not specified then the message must be sent using the | |
256 | \&\f(CW\*(C`datasend\*(C'\fR and \f(CW\*(C`dataend\*(C'\fR methods from Net::Cmd | |
257 | .Sp | |
258 | \&\f(CW\*(C`MESSAGE\*(C'\fR can be either an array of lines or a reference to an array. | |
259 | .IP "last ()" 4 | |
260 | .IX Item "last ()" | |
261 | Set the \*(L"current article pointer\*(R" to the previous article in the current | |
262 | newsgroup. | |
263 | .Sp | |
264 | Returns the message-id of the article. | |
265 | .IP "date ()" 4 | |
266 | .IX Item "date ()" | |
267 | Returns the date on the remote server. This date will be in a \s-1UNIX\s0 time | |
268 | format (seconds since 1970) | |
269 | .IP "postok ()" 4 | |
270 | .IX Item "postok ()" | |
271 | \&\f(CW\*(C`postok\*(C'\fR will return \fItrue\fR if the servers initial response indicated | |
272 | that it will allow posting. | |
273 | .IP "authinfo ( \s-1USER\s0, \s-1PASS\s0 )" 4 | |
274 | .IX Item "authinfo ( USER, PASS )" | |
275 | Authenticates to the server (using \s-1AUTHINFO\s0 \s-1USER\s0 / \s-1AUTHINFO\s0 \s-1PASS\s0) | |
276 | using the supplied username and password. Please note that the | |
277 | password is sent in clear text to the server. This command should not | |
278 | be used with valuable passwords unless the connection to the server is | |
279 | somehow protected. | |
280 | .IP "list ()" 4 | |
281 | .IX Item "list ()" | |
282 | Obtain information about all the active newsgroups. The results is a reference | |
283 | to a hash where the key is a group name and each value is a reference to an | |
284 | array. The elements in this array are:\- the last article number in the group, | |
285 | the first article number in the group and any information flags about the group. | |
286 | .IP "newgroups ( \s-1SINCE\s0 [, \s-1DISTRIBUTIONS\s0 ])" 4 | |
287 | .IX Item "newgroups ( SINCE [, DISTRIBUTIONS ])" | |
288 | \&\f(CW\*(C`SINCE\*(C'\fR is a time value and \f(CW\*(C`DISTRIBUTIONS\*(C'\fR is either a distribution | |
289 | pattern or a reference to a list of distribution patterns. | |
290 | The result is the same as \f(CW\*(C`list\*(C'\fR, but the | |
291 | groups return will be limited to those created after \f(CW\*(C`SINCE\*(C'\fR and, if | |
292 | specified, in one of the distribution areas in \f(CW\*(C`DISTRIBUTIONS\*(C'\fR. | |
293 | .IP "newnews ( \s-1SINCE\s0 [, \s-1GROUPS\s0 [, \s-1DISTRIBUTIONS\s0 ]])" 4 | |
294 | .IX Item "newnews ( SINCE [, GROUPS [, DISTRIBUTIONS ]])" | |
295 | \&\f(CW\*(C`SINCE\*(C'\fR is a time value. \f(CW\*(C`GROUPS\*(C'\fR is either a group pattern or a reference | |
296 | to a list of group patterns. \f(CW\*(C`DISTRIBUTIONS\*(C'\fR is either a distribution | |
297 | pattern or a reference to a list of distribution patterns. | |
298 | .Sp | |
299 | Returns a reference to a list which contains the message-ids of all news posted | |
300 | after \f(CW\*(C`SINCE\*(C'\fR, that are in a groups which matched \f(CW\*(C`GROUPS\*(C'\fR and a | |
301 | distribution which matches \f(CW\*(C`DISTRIBUTIONS\*(C'\fR. | |
302 | .IP "next ()" 4 | |
303 | .IX Item "next ()" | |
304 | Set the \*(L"current article pointer\*(R" to the next article in the current | |
305 | newsgroup. | |
306 | .Sp | |
307 | Returns the message-id of the article. | |
308 | .IP "post ( [ \s-1MESSAGE\s0 ] )" 4 | |
309 | .IX Item "post ( [ MESSAGE ] )" | |
310 | Post a new article to the news server. If \f(CW\*(C`MESSAGE\*(C'\fR is specified and posting | |
311 | is allowed then the message will be sent. | |
312 | .Sp | |
313 | If \f(CW\*(C`MESSAGE\*(C'\fR is not specified then the message must be sent using the | |
314 | \&\f(CW\*(C`datasend\*(C'\fR and \f(CW\*(C`dataend\*(C'\fR methods from Net::Cmd | |
315 | .Sp | |
316 | \&\f(CW\*(C`MESSAGE\*(C'\fR can be either an array of lines or a reference to an array. | |
317 | .Sp | |
318 | The message, either sent via \f(CW\*(C`datasend\*(C'\fR or as the \f(CW\*(C`MESSAGE\*(C'\fR | |
319 | parameter, must be in the format as described by \s-1RFC822\s0 and must | |
320 | contain From:, Newsgroups: and Subject: headers. | |
321 | .IP "postfh ()" 4 | |
322 | .IX Item "postfh ()" | |
323 | Post a new article to the news server using a tied filehandle. If | |
324 | posting is allowed, this method will return a tied filehandle that you | |
325 | can \fIprint()\fR the contents of the article to be posted. You must | |
326 | explicitly \fIclose()\fR the filehandle when you are finished posting the | |
327 | article, and the return value from the \fIclose()\fR call will indicate | |
328 | whether the message was successfully posted. | |
329 | .IP "slave ()" 4 | |
330 | .IX Item "slave ()" | |
331 | Tell the remote server that I am not a user client, but probably another | |
332 | news server. | |
333 | .IP "quit ()" 4 | |
334 | .IX Item "quit ()" | |
335 | Quit the remote server and close the socket connection. | |
336 | .Sh "Extension methods" | |
337 | .IX Subsection "Extension methods" | |
338 | These methods use commands that are not part of the \s-1RFC977\s0 documentation. Some | |
339 | servers may not support all of them. | |
340 | .IP "newsgroups ( [ \s-1PATTERN\s0 ] )" 4 | |
341 | .IX Item "newsgroups ( [ PATTERN ] )" | |
342 | Returns a reference to a hash where the keys are all the group names which | |
343 | match \f(CW\*(C`PATTERN\*(C'\fR, or all of the groups if no pattern is specified, and | |
344 | each value contains the description text for the group. | |
345 | .IP "distributions ()" 4 | |
346 | .IX Item "distributions ()" | |
347 | Returns a reference to a hash where the keys are all the possible | |
348 | distribution names and the values are the distribution descriptions. | |
349 | .IP "subscriptions ()" 4 | |
350 | .IX Item "subscriptions ()" | |
351 | Returns a reference to a list which contains a list of groups which | |
352 | are recommended for a new user to subscribe to. | |
353 | .IP "overview_fmt ()" 4 | |
354 | .IX Item "overview_fmt ()" | |
355 | Returns a reference to an array which contain the names of the fields returned | |
356 | by \f(CW\*(C`xover\*(C'\fR. | |
357 | .IP "active_times ()" 4 | |
358 | .IX Item "active_times ()" | |
359 | Returns a reference to a hash where the keys are the group names and each | |
360 | value is a reference to an array containing the time the groups was created | |
361 | and an identifier, possibly an Email address, of the creator. | |
362 | .IP "active ( [ \s-1PATTERN\s0 ] )" 4 | |
363 | .IX Item "active ( [ PATTERN ] )" | |
364 | Similar to \f(CW\*(C`list\*(C'\fR but only active groups that match the pattern are returned. | |
365 | \&\f(CW\*(C`PATTERN\*(C'\fR can be a group pattern. | |
366 | .IP "xgtitle ( \s-1PATTERN\s0 )" 4 | |
367 | .IX Item "xgtitle ( PATTERN )" | |
368 | Returns a reference to a hash where the keys are all the group names which | |
369 | match \f(CW\*(C`PATTERN\*(C'\fR and each value is the description text for the group. | |
370 | .IP "xhdr ( \s-1HEADER\s0, MESSAGE-SPEC )" 4 | |
371 | .IX Item "xhdr ( HEADER, MESSAGE-SPEC )" | |
372 | Obtain the header field \f(CW\*(C`HEADER\*(C'\fR for all the messages specified. | |
373 | .Sp | |
374 | The return value will be a reference | |
375 | to a hash where the keys are the message numbers and each value contains | |
376 | the text of the requested header for that message. | |
377 | .IP "xover ( MESSAGE-SPEC )" 4 | |
378 | .IX Item "xover ( MESSAGE-SPEC )" | |
379 | The return value will be a reference | |
380 | to a hash where the keys are the message numbers and each value contains | |
381 | a reference to an array which contains the overview fields for that | |
382 | message. | |
383 | .Sp | |
384 | The names of the fields can be obtained by calling \f(CW\*(C`overview_fmt\*(C'\fR. | |
385 | .IP "xpath ( MESSAGE-ID )" 4 | |
386 | .IX Item "xpath ( MESSAGE-ID )" | |
387 | Returns the path name to the file on the server which contains the specified | |
388 | message. | |
389 | .IP "xpat ( \s-1HEADER\s0, \s-1PATTERN\s0, \s-1MESSAGE\-SPEC\s0)" 4 | |
390 | .IX Item "xpat ( HEADER, PATTERN, MESSAGE-SPEC)" | |
391 | The result is the same as \f(CW\*(C`xhdr\*(C'\fR except the is will be restricted to | |
392 | headers where the text of the header matches \f(CW\*(C`PATTERN\*(C'\fR | |
393 | .IP "xrover" 4 | |
394 | .IX Item "xrover" | |
395 | The \s-1XROVER\s0 command returns reference information for the article(s) | |
396 | specified. | |
397 | .Sp | |
398 | Returns a reference to a \s-1HASH\s0 where the keys are the message numbers and the | |
399 | values are the References: lines from the articles | |
400 | .IP "listgroup ( [ \s-1GROUP\s0 ] )" 4 | |
401 | .IX Item "listgroup ( [ GROUP ] )" | |
402 | Returns a reference to a list of all the active messages in \f(CW\*(C`GROUP\*(C'\fR, or | |
403 | the current group if \f(CW\*(C`GROUP\*(C'\fR is not specified. | |
404 | .IP "reader" 4 | |
405 | .IX Item "reader" | |
406 | Tell the server that you are a reader and not another server. | |
407 | .Sp | |
408 | This is required by some servers. For example if you are connecting to | |
409 | an \s-1INN\s0 server and you have transfer permission your connection will | |
410 | be connected to the transfer daemon, not the \s-1NNTP\s0 daemon. Issuing | |
411 | this command will cause the transfer daemon to hand over control | |
412 | to the \s-1NNTP\s0 daemon. | |
413 | .Sp | |
414 | Some servers do not understand this command, but issuing it and ignoring | |
415 | the response is harmless. | |
416 | .SH "UNSUPPORTED" | |
417 | .IX Header "UNSUPPORTED" | |
418 | The following \s-1NNTP\s0 command are unsupported by the package, and there are | |
419 | no plans to do so. | |
420 | .PP | |
421 | .Vb 4 | |
422 | \& AUTHINFO GENERIC | |
423 | \& XTHREAD | |
424 | \& XSEARCH | |
425 | \& XINDEX | |
426 | .Ve | |
427 | .SH "DEFINITIONS" | |
428 | .IX Header "DEFINITIONS" | |
429 | .IP "MESSAGE-SPEC" 4 | |
430 | .IX Item "MESSAGE-SPEC" | |
431 | \&\f(CW\*(C`MESSAGE\-SPEC\*(C'\fR is either a single message\-id, a single message number, or | |
432 | a reference to a list of two message numbers. | |
433 | .Sp | |
434 | If \f(CW\*(C`MESSAGE\-SPEC\*(C'\fR is a reference to a list of two message numbers and the | |
435 | second number in a range is less than or equal to the first then the range | |
436 | represents all messages in the group after the first message number. | |
437 | .Sp | |
438 | \&\fB\s-1NOTE\s0\fR For compatibility reasons only with earlier versions of Net::NNTP | |
439 | a message spec can be passed as a list of two numbers, this is deprecated | |
440 | and a reference to the list should now be passed | |
441 | .IP "\s-1PATTERN\s0" 4 | |
442 | .IX Item "PATTERN" | |
443 | The \f(CW\*(C`NNTP\*(C'\fR protocol uses the \f(CW\*(C`WILDMAT\*(C'\fR format for patterns. | |
444 | The \s-1WILDMAT\s0 format was first developed by Rich Salz based on | |
445 | the format used in the \s-1UNIX\s0 \*(L"find\*(R" command to articulate | |
446 | file names. It was developed to provide a uniform mechanism | |
447 | for matching patterns in the same manner that the \s-1UNIX\s0 shell | |
448 | matches filenames. | |
449 | .Sp | |
450 | Patterns are implicitly anchored at the | |
451 | beginning and end of each string when testing for a match. | |
452 | .Sp | |
453 | There are five pattern matching operations other than a strict | |
454 | one-to-one match between the pattern and the source to be | |
455 | checked for a match. | |
456 | .Sp | |
457 | The first is an asterisk \f(CW\*(C`*\*(C'\fR to match any sequence of zero or more | |
458 | characters. | |
459 | .Sp | |
460 | The second is a question mark \f(CW\*(C`?\*(C'\fR to match any single character. The | |
461 | third specifies a specific set of characters. | |
462 | .Sp | |
463 | The set is specified as a list of characters, or as a range of characters | |
464 | where the beginning and end of the range are separated by a minus (or dash) | |
465 | character, or as any combination of lists and ranges. The dash can | |
466 | also be included in the set as a character it if is the beginning | |
467 | or end of the set. This set is enclosed in square brackets. The | |
468 | close square bracket \f(CW\*(C`]\*(C'\fR may be used in a set if it is the first | |
469 | character in the set. | |
470 | .Sp | |
471 | The fourth operation is the same as the | |
472 | logical not of the third operation and is specified the same | |
473 | way as the third with the addition of a caret character \f(CW\*(C`^\*(C'\fR at | |
474 | the beginning of the test string just inside the open square | |
475 | bracket. | |
476 | .Sp | |
477 | The final operation uses the backslash character to | |
478 | invalidate the special meaning of an open square bracket \f(CW\*(C`[\*(C'\fR, | |
479 | the asterisk, backslash or the question mark. Two backslashes in | |
480 | sequence will result in the evaluation of the backslash as a | |
481 | character with no special meaning. | |
482 | .RS 4 | |
483 | .IP "Examples" 4 | |
484 | .IX Item "Examples" | |
485 | .PD 0 | |
486 | .ie n .IP """[^]\-]""" 4 | |
487 | .el .IP "\f(CW[^]\-]\fR" 4 | |
488 | .IX Item "[^]-]" | |
489 | .PD | |
490 | matches any single character other than a close square | |
491 | bracket or a minus sign/dash. | |
492 | .ie n .IP "*bdc" 4 | |
493 | .el .IP "\f(CW*bdc\fR" 4 | |
494 | .IX Item "*bdc" | |
495 | matches any string that ends with the string \*(L"bdc\*(R" | |
496 | including the string \*(L"bdc\*(R" (without quotes). | |
497 | .ie n .IP """[0\-9a\-zA\-Z]""" 4 | |
498 | .el .IP "\f(CW[0\-9a\-zA\-Z]\fR" 4 | |
499 | .IX Item "[0-9a-zA-Z]" | |
500 | matches any single printable alphanumeric \s-1ASCII\s0 character. | |
501 | .ie n .IP """a??d""" 4 | |
502 | .el .IP "\f(CWa??d\fR" 4 | |
503 | .IX Item "a??d" | |
504 | matches any four character string which begins | |
505 | with a and ends with d. | |
506 | .RE | |
507 | .RS 4 | |
508 | .RE | |
509 | .SH "SEE ALSO" | |
510 | .IX Header "SEE ALSO" | |
511 | Net::Cmd | |
512 | .SH "AUTHOR" | |
513 | .IX Header "AUTHOR" | |
514 | Graham Barr <gbarr@pobox.com> | |
515 | .SH "COPYRIGHT" | |
516 | .IX Header "COPYRIGHT" | |
517 | Copyright (c) 1995\-1997 Graham Barr. All rights reserved. | |
518 | This program is free software; you can redistribute it and/or modify | |
519 | it under the same terms as Perl itself. | |
520 | .PP | |
521 | \&\fI$Id: //depot/libnet/Net/NNTP.pm#18 $\fR |