📄 net::nntp.3
字号:
.IP "last ()" 4.IX Item "last ()"Set the \*(L"current article pointer\*(R" to the previous article in the currentnewsgroup..SpReturns the message-id of the article..IP "date ()" 4.IX Item "date ()"Returns the date on the remote server. This date will be in a \s-1UNIX\s0 timeformat (seconds since 1970).IP "postok ()" 4.IX Item "postok ()"\&\f(CW\*(C`postok\*(C'\fR will return \fItrue\fR if the servers initial response indicatedthat it will allow posting..IP "authinfo ( \s-1USER\s0, \s-1PASS\s0 )" 4.IX Item "authinfo ( USER, PASS )"Authenticates to the server (using \s-1AUTHINFO\s0 \s-1USER\s0 / \s-1AUTHINFO\s0 \s-1PASS\s0)using the supplied username and password. Please note that thepassword is sent in clear text to the server. This command should notbe used with valuable passwords unless the connection to the server issomehow protected..IP "list ()" 4.IX Item "list ()"Obtain information about all the active newsgroups. The results is a referenceto a hash where the key is a group name and each value is a reference to anarray. The elements in this array are:\- the last article number in the group,the first article number in the group and any information flags about the group..IP "newgroups ( \s-1SINCE\s0 [, \s-1DISTRIBUTIONS\s0 ])" 4.IX Item "newgroups ( SINCE [, DISTRIBUTIONS ])"\&\f(CW\*(C`SINCE\*(C'\fR is a time value and \f(CW\*(C`DISTRIBUTIONS\*(C'\fR is either a distributionpattern or a reference to a list of distribution patterns.The result is the same as \f(CW\*(C`list\*(C'\fR, but thegroups return will be limited to those created after \f(CW\*(C`SINCE\*(C'\fR and, ifspecified, in one of the distribution areas in \f(CW\*(C`DISTRIBUTIONS\*(C'\fR..IP "newnews ( \s-1SINCE\s0 [, \s-1GROUPS\s0 [, \s-1DISTRIBUTIONS\s0 ]])" 4.IX Item "newnews ( SINCE [, GROUPS [, DISTRIBUTIONS ]])"\&\f(CW\*(C`SINCE\*(C'\fR is a time value. \f(CW\*(C`GROUPS\*(C'\fR is either a group pattern or a referenceto a list of group patterns. \f(CW\*(C`DISTRIBUTIONS\*(C'\fR is either a distributionpattern or a reference to a list of distribution patterns..SpReturns a reference to a list which contains the message-ids of all news postedafter \f(CW\*(C`SINCE\*(C'\fR, that are in a groups which matched \f(CW\*(C`GROUPS\*(C'\fR and adistribution which matches \f(CW\*(C`DISTRIBUTIONS\*(C'\fR..IP "next ()" 4.IX Item "next ()"Set the \*(L"current article pointer\*(R" to the next article in the currentnewsgroup..SpReturns the message-id of the article..IP "post ( [ \s-1MESSAGE\s0 ] )" 4.IX Item "post ( [ MESSAGE ] )"Post a new article to the news server. If \f(CW\*(C`MESSAGE\*(C'\fR is specified and postingis allowed then the message will be sent..SpIf \f(CW\*(C`MESSAGE\*(C'\fR is not specified then the message must be sent using the\&\f(CW\*(C`datasend\*(C'\fR and \f(CW\*(C`dataend\*(C'\fR methods from Net::Cmd.Sp\&\f(CW\*(C`MESSAGE\*(C'\fR can be either an array of lines or a reference to an array..SpThe message, either sent via \f(CW\*(C`datasend\*(C'\fR or as the \f(CW\*(C`MESSAGE\*(C'\fRparameter, must be in the format as described by \s-1RFC822\s0 and mustcontain From:, Newsgroups: and Subject: headers..IP "postfh ()" 4.IX Item "postfh ()"Post a new article to the news server using a tied filehandle. Ifposting is allowed, this method will return a tied filehandle that youcan \fIprint()\fR the contents of the article to be posted. You mustexplicitly \fIclose()\fR the filehandle when you are finished posting thearticle, and the return value from the \fIclose()\fR call will indicatewhether the message was successfully posted..IP "slave ()" 4.IX Item "slave ()"Tell the remote server that I am not a user client, but probably anothernews server..IP "quit ()" 4.IX Item "quit ()"Quit the remote server and close the socket connection..Sh "Extension methods".IX Subsection "Extension methods"These methods use commands that are not part of the \s-1RFC977\s0 documentation. Someservers may not support all of them..IP "newsgroups ( [ \s-1PATTERN\s0 ] )" 4.IX Item "newsgroups ( [ PATTERN ] )"Returns a reference to a hash where the keys are all the group names whichmatch \f(CW\*(C`PATTERN\*(C'\fR, or all of the groups if no pattern is specified, andeach value contains the description text for the group..IP "distributions ()" 4.IX Item "distributions ()"Returns a reference to a hash where the keys are all the possibledistribution names and the values are the distribution descriptions..IP "subscriptions ()" 4.IX Item "subscriptions ()"Returns a reference to a list which contains a list of groups whichare recommended for a new user to subscribe to..IP "overview_fmt ()" 4.IX Item "overview_fmt ()"Returns a reference to an array which contain the names of the fields returnedby \f(CW\*(C`xover\*(C'\fR..IP "active_times ()" 4.IX Item "active_times ()"Returns a reference to a hash where the keys are the group names and eachvalue is a reference to an array containing the time the groups was createdand an identifier, possibly an Email address, of the creator..IP "active ( [ \s-1PATTERN\s0 ] )" 4.IX Item "active ( [ PATTERN ] )"Similar to \f(CW\*(C`list\*(C'\fR but only active groups that match the pattern are returned.\&\f(CW\*(C`PATTERN\*(C'\fR can be a group pattern..IP "xgtitle ( \s-1PATTERN\s0 )" 4.IX Item "xgtitle ( PATTERN )"Returns a reference to a hash where the keys are all the group names whichmatch \f(CW\*(C`PATTERN\*(C'\fR and each value is the description text for the group..IP "xhdr ( \s-1HEADER\s0, MESSAGE-SPEC )" 4.IX Item "xhdr ( HEADER, MESSAGE-SPEC )"Obtain the header field \f(CW\*(C`HEADER\*(C'\fR for all the messages specified..SpThe return value will be a referenceto a hash where the keys are the message numbers and each value containsthe text of the requested header for that message..IP "xover ( MESSAGE-SPEC )" 4.IX Item "xover ( MESSAGE-SPEC )"The return value will be a referenceto a hash where the keys are the message numbers and each value containsa reference to an array which contains the overview fields for thatmessage..SpThe names of the fields can be obtained by calling \f(CW\*(C`overview_fmt\*(C'\fR..IP "xpath ( MESSAGE-ID )" 4.IX Item "xpath ( MESSAGE-ID )"Returns the path name to the file on the server which contains the specifiedmessage..IP "xpat ( \s-1HEADER\s0, \s-1PATTERN\s0, MESSAGE-SPEC)" 4.IX Item "xpat ( HEADER, PATTERN, MESSAGE-SPEC)"The result is the same as \f(CW\*(C`xhdr\*(C'\fR except the is will be restricted toheaders where the text of the header matches \f(CW\*(C`PATTERN\*(C'\fR.IP "xrover" 4.IX Item "xrover"The \s-1XROVER\s0 command returns reference information for the article(s)specified..SpReturns a reference to a \s-1HASH\s0 where the keys are the message numbers and thevalues are the References: lines from the articles.IP "listgroup ( [ \s-1GROUP\s0 ] )" 4.IX Item "listgroup ( [ GROUP ] )"Returns a reference to a list of all the active messages in \f(CW\*(C`GROUP\*(C'\fR, orthe current group if \f(CW\*(C`GROUP\*(C'\fR is not specified..IP "reader" 4.IX Item "reader"Tell the server that you are a reader and not another server..SpThis is required by some servers. For example if you are connecting toan \s-1INN\s0 server and you have transfer permission your connection willbe connected to the transfer daemon, not the \s-1NNTP\s0 daemon. Issuingthis command will cause the transfer daemon to hand over controlto the \s-1NNTP\s0 daemon..SpSome servers do not understand this command, but issuing it and ignoringthe response is harmless..SH "UNSUPPORTED".IX Header "UNSUPPORTED"The following \s-1NNTP\s0 command are unsupported by the package, and there areno plans to do so..PP.Vb 4\& AUTHINFO GENERIC\& XTHREAD\& XSEARCH\& XINDEX.Ve.SH "DEFINITIONS".IX Header "DEFINITIONS".IP "MESSAGE-SPEC" 4.IX Item "MESSAGE-SPEC"\&\f(CW\*(C`MESSAGE\-SPEC\*(C'\fR is either a single message-id, a single message number, ora reference to a list of two message numbers..SpIf \f(CW\*(C`MESSAGE\-SPEC\*(C'\fR is a reference to a list of two message numbers and thesecond number in a range is less than or equal to the first then the rangerepresents all messages in the group after the first message number..Sp\&\fB\s-1NOTE\s0\fR For compatibility reasons only with earlier versions of Net::NNTPa message spec can be passed as a list of two numbers, this is deprecatedand a reference to the list should now be passed.IP "\s-1PATTERN\s0" 4.IX Item "PATTERN"The \f(CW\*(C`NNTP\*(C'\fR protocol uses the \f(CW\*(C`WILDMAT\*(C'\fR format for patterns.The \s-1WILDMAT\s0 format was first developed by Rich Salz based onthe format used in the \s-1UNIX\s0 \*(L"find\*(R" command to articulatefile names. It was developed to provide a uniform mechanismfor matching patterns in the same manner that the \s-1UNIX\s0 shellmatches filenames..SpPatterns are implicitly anchored at thebeginning and end of each string when testing for a match..SpThere are five pattern matching operations other than a strictone-to-one match between the pattern and the source to bechecked for a match..SpThe first is an asterisk \f(CW\*(C`*\*(C'\fR to match any sequence of zero or morecharacters..SpThe second is a question mark \f(CW\*(C`?\*(C'\fR to match any single character. Thethird specifies a specific set of characters..SpThe set is specified as a list of characters, or as a range of characterswhere the beginning and end of the range are separated by a minus (or dash)character, or as any combination of lists and ranges. The dash canalso be included in the set as a character it if is the beginningor end of the set. This set is enclosed in square brackets. Theclose square bracket \f(CW\*(C`]\*(C'\fR may be used in a set if it is the firstcharacter in the set..SpThe fourth operation is the same as thelogical not of the third operation and is specified the sameway as the third with the addition of a caret character \f(CW\*(C`^\*(C'\fR atthe beginning of the test string just inside the open squarebracket..SpThe final operation uses the backslash character toinvalidate the special meaning of an open square bracket \f(CW\*(C`[\*(C'\fR,the asterisk, backslash or the question mark. Two backslashes insequence will result in the evaluation of the backslash as acharacter with no special meaning..RS 4.IP "Examples" 4.IX Item "Examples".PD 0.ie n .IP """[^]\-]""" 4.el .IP "\f(CW[^]\-]\fR" 4.IX Item "[^]-]".PDmatches any single character other than a close squarebracket or a minus sign/dash..ie n .IP "*bdc" 4.el .IP "\f(CW*bdc\fR" 4.IX Item "*bdc"matches any string that ends with the string \*(L"bdc\*(R"including the string \*(L"bdc\*(R" (without quotes)..ie n .IP """[0\-9a\-zA\-Z]""" 4.el .IP "\f(CW[0\-9a\-zA\-Z]\fR" 4.IX Item "[0-9a-zA-Z]"matches any single printable alphanumeric \s-1ASCII\s0 character..ie n .IP """a??d""" 4.el .IP "\f(CWa??d\fR" 4.IX Item "a??d"matches any four character string which beginswith a and ends with d..RE.RS 4.RE.SH "SEE ALSO".IX Header "SEE ALSO"Net::Cmd.SH "AUTHOR".IX Header "AUTHOR"Graham Barr <gbarr@pobox.com>.SH "COPYRIGHT".IX Header "COPYRIGHT"Copyright (c) 1995\-1997 Graham Barr. All rights reserved.This program is free software; you can redistribute it and/or modifyit under the same terms as Perl itself.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -