⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perlpod.1

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 1
📖 第 1 页 / 共 2 页
字号:
.Vb 2\&  =for comment\&  Make sure that all the available options are documented!.Ve.SpSome \fIformatnames\fR will require a leading colon (as in\&\f(CW"=for :formatname"\fR, or\&\f(CW"=begin :formatname" ... "=end :formatname"\fR),to signal that the text is not raw data, but instead \fIis\fR Pod text(i.e., possibly containing formatting codes) that's just not fornormal formatting (e.g., may not be a normal-use paragraph, but mightbe for formatting as a footnote)..ie n .IP """=encoding \f(CIencodingname\f(CW""" 4.el .IP "\f(CW=encoding \f(CIencodingname\f(CW\fR" 4.IX Xref "=encoding encoding".IX Item "=encoding encodingname"This command is used for declaring the encoding of a document.  Mostusers won't need this; but if your encoding isn't US-ASCII or Latin\-1,then put a \f(CW\*(C`=encoding \f(CIencodingname\f(CW\*(C'\fR command early in the document sothat pod formatters will know how to decode the document.  For\&\fIencodingname\fR, use a name recognized by the Encode::Supportedmodule.  Examples:.Sp.Vb 1\&  =encoding utf8\&\&  =encoding koi8\-r\&  \&  =encoding ShiftJIS\&  \&  =encoding big5.Ve.PPAnd don't forget, when using any command, that the command lasts upuntil the end of its \fIparagraph\fR, not its line.  So in theexamples below, you can see that every command needs the blankline after it, to end its paragraph..PPSome examples of lists include:.PP.Vb 1\&  =over\&\&  =item *\&\&  First item\&\&  =item *\&\&  Second item\&\&  =back\&\&  =over\&\&  =item Foo()\&\&  Description of Foo function\&\&  =item Bar()\&\&  Description of Bar function\&\&  =back.Ve.Sh "Formatting Codes".IX Xref "POD, formatting code formatting code POD, interior sequence interior sequence".IX Subsection "Formatting Codes"In ordinary paragraphs and in some command paragraphs, variousformatting codes (a.k.a. \*(L"interior sequences\*(R") can be used:.ie n .IP """I<text>"" \*(-- italic text" 4.el .IP "\f(CWI<text>\fR \*(-- italic text" 4.IX Xref "I I<> POD, formatting code, italic italic".IX Item "I<text>  italic text"Used for emphasis ("\f(CW\*(C`be I<careful!>\*(C'\fR\*(L") and parameters(\*(R"\f(CW\*(C`redo I<LABEL>\*(C'\fR").ie n .IP """B<text>"" \*(-- bold text" 4.el .IP "\f(CWB<text>\fR \*(-- bold text" 4.IX Xref "B B<> POD, formatting code, bold bold".IX Item "B<text>  bold text"Used for switches ("\f(CW\*(C`perl\*(Aqs B<\-n> switch\*(C'\fR\*(L"), programs(\*(R"\f(CW\*(C`some systems provide a B<chfn> for that\*(C'\fR\*(L"),emphasis (\*(R"\f(CW\*(C`be B<careful!>\*(C'\fR\*(L"), and so on(\*(R"\f(CW\*(C`and that feature is known as B<autovivification>\*(C'\fR")..ie n .IP """C<code>"" \*(-- code text" 4.el .IP "\f(CWC<code>\fR \*(-- code text" 4.IX Xref "C C<> POD, formatting code, code code".IX Item "C<code>  code text"Renders code in a typewriter font, or gives some other indication thatthis represents program text ("\f(CW\*(C`C<gmtime($^T)>\*(C'\fR\*(L") or some otherform of computerese (\*(R"\f(CW\*(C`C<drwxr\-xr\-x>\*(C'\fR")..ie n .IP """L<name>"" \*(-- a hyperlink" 4.el .IP "\f(CWL<name>\fR \*(-- a hyperlink" 4.IX Xref "L L<> POD, formatting code, hyperlink hyperlink".IX Item "L<name>  a hyperlink"There are various syntaxes, listed below.  In the syntaxes given,\&\f(CW\*(C`text\*(C'\fR, \f(CW\*(C`name\*(C'\fR, and \f(CW\*(C`section\*(C'\fR cannot contain the characters\&'/' and '|'; and any '<' or '>' should be matched..RS 4.IP "\(bu" 4\&\f(CW\*(C`L<name>\*(C'\fR.SpLink to a Perl manual page (e.g., \f(CW\*(C`L<Net::Ping>\*(C'\fR).  Notethat \f(CW\*(C`name\*(C'\fR should not contain spaces.  This syntaxis also occasionally used for references to \s-1UNIX\s0 man pages, as in\&\f(CW\*(C`L<crontab(5)>\*(C'\fR..IP "\(bu" 4\&\f(CW\*(C`L<name/"sec">\*(C'\fR or \f(CW\*(C`L<name/sec>\*(C'\fR.SpLink to a section in other manual page.  E.g.,\&\f(CW\*(C`L<perlsyn/"For Loops">\*(C'\fR.IP "\(bu" 4\&\f(CW\*(C`L</"sec">\*(C'\fR or \f(CW\*(C`L</sec>\*(C'\fR or \f(CW\*(C`L<"sec">\*(C'\fR.SpLink to a section in this manual page.  E.g.,\&\f(CW\*(C`L</"Object Methods">\*(C'\fR.RE.RS 4.SpA section is started by the named heading or item.  Forexample, \f(CW\*(C`L<perlvar/$.>\*(C'\fR or \f(CW\*(C`L<perlvar/"$.">\*(C'\fR bothlink to the section started by "\f(CW\*(C`=item $.\*(C'\fR" in perlvar.  And\&\f(CW\*(C`L<perlsyn/For Loops>\*(C'\fR or \f(CW\*(C`L<perlsyn/"For Loops">\*(C'\fRboth link to the section started by "\f(CW\*(C`=head2 For Loops\*(C'\fR"in perlsyn..SpTo control what text is used for display, youuse "\f(CW\*(C`L<text|...>\*(C'\fR", as in:.IP "\(bu" 4\&\f(CW\*(C`L<text|name>\*(C'\fR.SpLink this text to that manual page.  E.g.,\&\f(CW\*(C`L<Perl Error Messages|perldiag>\*(C'\fR.IP "\(bu" 4\&\f(CW\*(C`L<text|name/"sec">\*(C'\fR or \f(CW\*(C`L<text|name/sec>\*(C'\fR.SpLink this text to that section in that manual page.  E.g.,\&\f(CW\*(C`L<postfix "if"|perlsyn/"Statement Modifiers">\*(C'\fR.IP "\(bu" 4\&\f(CW\*(C`L<text|/"sec">\*(C'\fR or \f(CW\*(C`L<text|/sec>\*(C'\fRor \f(CW\*(C`L<text|"sec">\*(C'\fR.SpLink this text to that section in this manual page.  E.g.,\&\f(CW\*(C`L<the various attributes|/"Member Data">\*(C'\fR.RE.RS 4.SpOr you can link to a web page:.IP "\(bu" 4\&\f(CW\*(C`L<scheme:...>\*(C'\fR.SpLinks to an absolute \s-1URL\s0.  For example,\&\f(CW\*(C`L<http://www.perl.org/>\*(C'\fR.  But notethat there is no corresponding \f(CW\*(C`L<text|scheme:...>\*(C'\fR syntax, forvarious reasons..RE.RS 4.RE.ie n .IP """E<escape>"" \*(-- a character escape" 4.el .IP "\f(CWE<escape>\fR \*(-- a character escape" 4.IX Xref "E E<> POD, formatting code, escape escape".IX Item "E<escape>  a character escape"Very similar to \s-1HTML/XML\s0 \f(CW\*(C`&\f(CIfoo\f(CW;\*(C'\fR \*(L"entity references\*(R":.RS 4.IP "\(bu" 4\&\f(CW\*(C`E<lt>\*(C'\fR \*(-- a literal < (less than).IP "\(bu" 4\&\f(CW\*(C`E<gt>\*(C'\fR \*(-- a literal > (greater than).IP "\(bu" 4\&\f(CW\*(C`E<verbar>\*(C'\fR \*(-- a literal | (\fIver\fRtical \fIbar\fR).IP "\(bu" 4\&\f(CW\*(C`E<sol>\*(C'\fR = a literal / (\fIsol\fRidus).SpThe above four are optional except in other formatting codes,notably \f(CW\*(C`L<...>\*(C'\fR, and when preceded by acapital letter..IP "\(bu" 4\&\f(CW\*(C`E<htmlname>\*(C'\fR.SpSome non-numeric \s-1HTML\s0 entity name, such as \f(CW\*(C`E<eacute>\*(C'\fR,meaning the same thing as \f(CW\*(C`&eacute;\*(C'\fR in \s-1HTML\s0 \*(-- i.e., a lowercasee with an acute (/\-shaped) accent..IP "\(bu" 4\&\f(CW\*(C`E<number>\*(C'\fR.SpThe ASCII/Latin\-1/Unicode character with that number.  Aleading \*(L"0x\*(R" means that \fInumber\fR is hex, as in\&\f(CW\*(C`E<0x201E>\*(C'\fR.  A leading \*(L"0\*(R" means that \fInumber\fR is octal,as in \f(CW\*(C`E<075>\*(C'\fR.  Otherwise \fInumber\fR is interpreted as beingin decimal, as in \f(CW\*(C`E<181>\*(C'\fR..SpNote that older Pod formatters might not recognize octal orhex numeric escapes, and that many formatters cannot reliablyrender characters above 255.  (Some formatters may even haveto use compromised renderings of Latin\-1 characters, likerendering \f(CW\*(C`E<eacute>\*(C'\fR as just a plain \*(L"e\*(R".).RE.RS 4.RE.ie n .IP """F<filename>"" \*(-- used for filenames" 4.el .IP "\f(CWF<filename>\fR \*(-- used for filenames" 4.IX Xref "F F<> POD, formatting code, filename filename".IX Item "F<filename>  used for filenames"Typically displayed in italics.  Example: "\f(CW\*(C`F<.cshrc>\*(C'\fR".ie n .IP """S<text>"" \*(-- text contains non-breaking spaces" 4.el .IP "\f(CWS<text>\fR \*(-- text contains non-breaking spaces" 4.IX Xref "S S<> POD, formatting code, non-breaking space non-breaking space".IX Item "S<text>  text contains non-breaking spaces"This means that the words in \fItext\fR should not be brokenacross lines.  Example: \f(CW\*(C`S<$x\ ?\ $y\ :\ $z>\*(C'\fR..ie n .IP """X<topic name>"" \*(-- an index entry" 4.el .IP "\f(CWX<topic name>\fR \*(-- an index entry" 4.IX Xref "X X<> POD, formatting code, index entry index entry".IX Item "X<topic name>  an index entry"This is ignored by most formatters, but some may use it for buildingindexes.  It always renders as empty-string.Example: \f(CW\*(C`X<absolutizing relative URLs>\*(C'\fR.ie n .IP """Z<>"" \*(-- a null (zero-effect) formatting code" 4.el .IP "\f(CWZ<>\fR \*(-- a null (zero-effect) formatting code" 4.IX Xref "Z Z<> POD, formatting code, null null".IX Item "Z<>  a null (zero-effect) formatting code"This is rarely used.  It's one way to get around using anE<...> code sometimes.  For example, instead of"\f(CW\*(C`NE<lt>3\*(C'\fR\*(L" (for \*(R"N<3\*(L") you could write\&\*(R"\f(CW\*(C`NZ<><3\*(C'\fR\*(L" (the \*(R"Z<>\*(L" breaks up the \*(R"N\*(L" andthe \*(R"<\*(L" so they can't be consideredthe part of a (fictitious) \*(R"N<...>" code..PPMost of the time, you will need only a single set of angle brackets todelimit the beginning and end of formatting codes.  However,sometimes you will want to put a real right angle bracket (agreater-than sign, '>') inside of a formatting code.  This is particularlycommon when using a formatting code to provide a different font-type for asnippet of code.  As with all things in Perl, there is more thanone way to do it.  One way is to simply escape the closing bracketusing an \f(CW\*(C`E\*(C'\fR code:.PP.Vb 1\&    C<$a E<lt>=E<gt> $b>.Ve.PPThis will produce: "\f(CW\*(C`$a <=> $b\*(C'\fR".PPA more readable, and perhaps more \*(L"plain\*(R" way is to use an alternateset of delimiters that doesn't require a single \*(L">\*(R" to be escaped.  Withthe Pod formatters that are standard starting with perl5.5.660, doubledangle brackets (\*(L"<<\*(R" and \*(L">>\*(R") may be used \fIif and only if there iswhitespace right after the opening delimiter and whitespace rightbefore the closing delimiter!\fR  For example, the following willdo the trick:.IX Xref "POD, formatting code, escaping with multiple brackets".PP.Vb 1\&    C<< $a <=> $b >>.Ve.PPIn fact, you can use as many repeated angle-brackets as you like solong as you have the same number of them in the opening and closingdelimiters, and make sure that whitespace immediately follows the last\&'<' of the opening delimiter, and immediately precedes the first '>'of the closing delimiter.  (The whitespace is ignored.)  So thefollowing will also work:.IX Xref "POD, formatting code, escaping with multiple brackets".PP.Vb 2\&    C<<< $a <=> $b >>>\&    C<<<<  $a <=> $b     >>>>.Ve.PPAnd they all mean exactly the same as this:.PP.Vb 1\&    C<$a E<lt>=E<gt> $b>.Ve.PPAs a further example, this means that if you wanted to put these bits ofcode in \f(CW\*(C`C\*(C'\fR (code) style:.PP.Vb 2\&    open(X, ">>thing.dat") || die $!\&    $foo\->bar();.Ve.PPyou could do it like so:.PP.Vb 2\&    C<<< open(X, ">>thing.dat") || die $! >>>\&    C<< $foo\->bar(); >>.Ve.PPwhich is presumably easier to read than the old way:.PP.Vb 2\&    C<open(X, "E<gt>E<gt>thing.dat") || die $!>\&    C<$foo\-E<gt>bar();>.Ve.PPThis is currently supported by pod2text (Pod::Text), pod2man (Pod::Man),and any other pod2xxx or Pod::Xxxx translators that usePod::Parser 1.093 or later, or Pod::Tree 1.02 or later..Sh "The Intent".IX Xref "POD, intent of".IX Subsection "The Intent"The intent is simplicity of use, not power of expression.  Paragraphslook like paragraphs (block format), so that they stand outvisually, and so that I could run them through \f(CW\*(C`fmt\*(C'\fR easily to reformatthem (that's F7 in my version of \fBvi\fR, or Esc Q in my version of\&\fBemacs\fR).  I wanted the translator to always leave the \f(CW\*(C`\*(Aq\*(C'\fR and \f(CW\*(C`\`\*(C'\fR and\&\f(CW\*(C`"\*(C'\fR quotes alone, in verbatim mode, so I could slurp in aworking program, shift it over four spaces, and have it print out, er,verbatim.  And presumably in a monospace font..PPThe Pod format is not necessarily sufficient for writing a book.  Podis just meant to be an idiot-proof common source for nroff, \s-1HTML\s0,TeX, and other markup languages, as used for onlinedocumentation.  Translators exist for \fBpod2text\fR, \fBpod2html\fR,\&\fBpod2man\fR (that's for \fInroff\fR\|(1) and \fItroff\fR\|(1)), \fBpod2latex\fR, and\&\fBpod2fm\fR.  Various others are available in \s-1CPAN\s0..Sh "Embedding Pods in Perl Modules".IX Xref "POD, embedding".IX Subsection "Embedding Pods in Perl Modules"You can embed Pod documentation in your Perl modules and scripts.Start your documentation with an empty line, a \*(L"=head1\*(R" command at thebeginning, and end it with a \*(L"=cut\*(R" command and an empty line.  Perlwill ignore the Pod text.  See any of the supplied library modules forexamples.  If you're going to put your Pod at the end of the file, andyou're using an _\|_END_\|_ or _\|_DATA_\|_ cut mark, make sure to put anempty line there before the first Pod command..PP.Vb 1\&  _\|_END_\|_\&\&  =head1 NAME\&\&  Time::Local \- efficiently compute time from local and GMT time.Ve.PPWithout that empty line before the \*(L"=head1\*(R", many translators wouldn'thave recognized the \*(L"=head1\*(R" as starting a Pod block..Sh "Hints for Writing Pod".IX Subsection "Hints for Writing Pod".IP "\(bu" 4.IX Xref "podchecker POD, validating".SpThe \fBpodchecker\fR command is provided for checking Pod syntax for errorsand warnings.  For example, it checks for completely blank lines inPod blocks and for unknown commands and formatting codes.  You shouldstill also pass your document through one or more translators and proofreadthe result, or print out the result and proofread that.  Some of theproblems found may be bugs in the translators, which you may or may notwish to work around..IP "\(bu" 4If you're more familiar with writing in \s-1HTML\s0 than with writing in Pod, youcan try your hand at writing documentation in simple \s-1HTML\s0, and convertingit to Pod with the experimental Pod::HTML2Pod module,(available in \s-1CPAN\s0), and looking at the resulting code.  The experimentalPod::PXML module in \s-1CPAN\s0 might also be useful..IP "\(bu" 4Many older Pod translators require the lines before every Podcommand and after every Pod command (including \*(L"=cut\*(R"!) to be a blankline.  Having something like this:.Sp.Vb 2\& # \- \- \- \- \- \- \- \- \- \- \- \-\& =item $firecracker\->boom()\&\& This noisily detonates the firecracker object.\& =cut\& sub boom {\& ....Ve.Sp\&...will make such Pod translators completely fail to see the Pod blockat all..SpInstead, have it like this:.Sp.Vb 1\& # \- \- \- \- \- \- \- \- \- \- \- \-\&\& =item $firecracker\->boom()\&\& This noisily detonates the firecracker object.\&\& =cut\&\& sub boom {\& ....Ve.IP "\(bu" 4Some older Pod translators require paragraphs (including commandparagraphs like \*(L"=head2 Functions\*(R") to be separated by \fIcompletely\fRempty lines.  If you have an apparently empty line with some spaceson it, this might not count as a separator for those translators, andthat could cause odd formatting..IP "\(bu" 4Older translators might add wording around an L<> link, so that\&\f(CW\*(C`L<Foo::Bar>\*(C'\fR may become \*(L"the Foo::Bar manpage\*(R", for example.So you shouldn't write things like \f(CW\*(C`the L<foo>documentation\*(C'\fR, if you want the translated document to read sensibly\&\*(-- instead write \f(CW\*(C`the L<Foo::Bar|Foo::Bar> documentation\*(C'\fR or\&\f(CW\*(C`L<the Foo::Bar documentation|Foo::Bar>\*(C'\fR, to control how thelink comes out..IP "\(bu" 4Going past the 70th column in a verbatim block might be ungracefullywrapped by some formatters..SH "SEE ALSO".IX Header "SEE ALSO"perlpodspec, \*(L"PODs: Embedded Documentation\*(R" in perlsyn,perlnewmod, perldoc, pod2html, pod2man, podchecker..SH "AUTHOR".IX Header "AUTHOR"Larry Wall, Sean M. Burke

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -