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

📄 perlpodspec.1

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 1
📖 第 1 页 / 共 5 页
字号:
paragraphs that they surround from being parsed as data or verbatimparagraphs, if \fIidentifier\fR doesn't begin with a colon.  Thisis discussed in detail in the section\&\*(L"About Data Paragraphs and \*(R"=begin/=end\*(L" Regions\*(R"..SH "Pod Commands".IX Header "Pod Commands"This section is intended to supplement and clarify the discussion in\&\*(L"Command Paragraph\*(R" in perlpod.  These are the currently recognizedPod commands:.ie n .IP """=head1"", ""=head2"", ""=head3"", ""=head4""" 4.el .IP "``=head1'', ``=head2'', ``=head3'', ``=head4''" 4.IX Item "=head1, =head2, =head3, =head4"This command indicates that the text in the remainder of the paragraphis a heading.  That text may contain formatting codes.  Examples:.Sp.Vb 1\&  =head1 Object Attributes\&\&  =head3 What B<Not> to Do!.Ve.ie n .IP """=pod""" 4.el .IP "``=pod''" 4.IX Item "=pod"This command indicates that this paragraph begins a Pod block.  (If weare already in the middle of a Pod block, this command has no effect atall.)  If there is any text in this command paragraph after \*(L"=pod\*(R",it must be ignored.  Examples:.Sp.Vb 1\&  =pod\&\&  This is a plain Pod paragraph.\&\&  =pod This text is ignored..Ve.ie n .IP """=cut""" 4.el .IP "``=cut''" 4.IX Item "=cut"This command indicates that this line is the end of this previouslystarted Pod block.  If there is any text after \*(L"=cut\*(R" on the line, it must beignored.  Examples:.Sp.Vb 1\&  =cut\&\&  =cut The documentation ends here.\&\&  =cut\&  # This is the first line of program text.\&  sub foo { # This is the second..Ve.SpIt is an error to try to \fIstart\fR a Pod block with a \*(L"=cut\*(R" command.  Inthat case, the Pod processor must halt parsing of the input file, andmust by default emit a warning..ie n .IP """=over""" 4.el .IP "``=over''" 4.IX Item "=over"This command indicates that this is the start of a list/indentregion.  If there is any text following the \*(L"=over\*(R", it must consistof only a nonzero positive numeral.  The semantics of this numeral isexplained in the \*(L"About =over...=back Regions\*(R" section, furtherbelow.  Formatting codes are not expanded.  Examples:.Sp.Vb 1\&  =over 3\&\&  =over 3.5\&\&  =over.Ve.ie n .IP """=item""" 4.el .IP "``=item''" 4.IX Item "=item"This command indicates that an item in a list begins here.  Formattingcodes are processed.  The semantics of the (optional) text in theremainder of this paragraph areexplained in the \*(L"About =over...=back Regions\*(R" section, furtherbelow.  Examples:.Sp.Vb 1\&  =item\&\&  =item *\&\&  =item      *    \&\&  =item 14\&\&  =item   3.\&\&  =item C<< $thing\->stuff(I<dodad>) >>\&\&  =item For transporting us beyond seas to be tried for pretended\&  offenses\&\&  =item He is at this time transporting large armies of foreign\&  mercenaries to complete the works of death, desolation and\&  tyranny, already begun with circumstances of cruelty and perfidy\&  scarcely paralleled in the most barbarous ages, and totally\&  unworthy the head of a civilized nation..Ve.ie n .IP """=back""" 4.el .IP "``=back''" 4.IX Item "=back"This command indicates that this is the end of the region begunby the most recent \*(L"=over\*(R" command.  It permits no text after the\&\*(L"=back\*(R" command..ie n .IP """=begin formatname""" 4.el .IP "``=begin formatname''" 4.IX Item "=begin formatname"This marks the following paragraphs (until the matching \*(L"=endformatname\*(R") as being for some special kind of processing.  Unless\&\*(L"formatname\*(R" begins with a colon, the contained non-commandparagraphs are data paragraphs.  But if \*(L"formatname\*(R" \fIdoes\fR beginwith a colon, then non-command paragraphs are ordinary paragraphsor data paragraphs.  This is discussed in detail in the section\&\*(L"About Data Paragraphs and \*(R"=begin/=end\*(L" Regions\*(R"..SpIt is advised that formatnames match the regexp\&\f(CW\*(C`m/\eA:?[\-a\-zA\-Z0\-9_]+\ez/\*(C'\fR.  Implementors should anticipate futureexpansion in the semantics and syntax of the first parameterto \*(L"=begin\*(R"/\*(L"=end\*(R"/\*(L"=for\*(R"..ie n .IP """=end formatname""" 4.el .IP "``=end formatname''" 4.IX Item "=end formatname"This marks the end of the region opened by the matching\&\*(L"=begin formatname\*(R" region.  If \*(L"formatname\*(R" is not the formatnameof the most recent open \*(L"=begin formatname\*(R" region, then thisis an error, and must generate an error message.  Thisis discussed in detail in the section\&\*(L"About Data Paragraphs and \*(R"=begin/=end\*(L" Regions\*(R"..ie n .IP """=for formatname text...""" 4.el .IP "``=for formatname text...''" 4.IX Item "=for formatname text..."This is synonymous with:.Sp.Vb 1\&     =begin formatname\&\&     text...\&\&     =end formatname.Ve.SpThat is, it creates a region consisting of a single paragraph; thatparagraph is to be treated as a normal paragraph if \*(L"formatname\*(R"begins with a \*(L":\*(R"; if \*(L"formatname\*(R" \fIdoesn't\fR begin with a colon,then \*(L"text...\*(R" will constitute a data paragraph.  There is no wayto use \*(L"=for formatname text...\*(R" to express \*(L"text...\*(R" as a verbatimparagraph..ie n .IP """=encoding encodingname""" 4.el .IP "``=encoding encodingname''" 4.IX Item "=encoding encodingname"This command, which should occur early in the document (at leastbefore any non-US-ASCII data!), declares that this document isencoded in the encoding \fIencodingname\fR, which must bean encoding name that Encoding recognizes.  (Encoding's listof supported encodings, in Encoding::Supported, is useful here.)If the Pod parser cannot decode the declared encoding, it should emit a warning and may abort parsing the documentaltogether..SpA document having more than one \*(L"=encoding\*(R" line should beconsidered an error.  Pod processors may silently tolerate this ifthe not-first \*(L"=encoding\*(R" lines are just duplicates of thefirst one (e.g., if there's a \*(L"=use utf8\*(R" line, and later onanother \*(L"=use utf8\*(R" line).  But Pod processors should complain ifthere are contradictory \*(L"=encoding\*(R" lines in the same document(e.g., if there is a \*(L"=encoding utf8\*(R" early in the document and\&\*(L"=encoding big5\*(R" later).  Pod processors that recognize BOMsmay also complain if they see an \*(L"=encoding\*(R" linethat contradicts the \s-1BOM\s0 (e.g., if a document with a \s-1UTF\-16LE\s0\&\s-1BOM\s0 has an \*(L"=encoding shiftjis\*(R" line)..PPIf a Pod processor sees any command other than the ones listedabove (like \*(L"=head\*(R", or \*(L"=haed1\*(R", or \*(L"=stuff\*(R", or \*(L"=cuttlefish\*(R",or \*(L"=w123\*(R"), that processor must by default treat this as anerror.  It must not process the paragraph beginning with thatcommand, must by default warn of this as an error, and mayabort the parse.  A Pod parser may allow a way for particularapplications to add to the above list of known commands, and tostipulate, for each additional command, whether formattingcodes should be processed..PPFuture versions of this specification may add additionalcommands..SH "Pod Formatting Codes".IX Header "Pod Formatting Codes"(Note that in previous drafts of this document and of perlpod,formatting codes were referred to as \*(L"interior sequences\*(R", andthis term may still be found in the documentation for Pod parsers,and in error messages from Pod processors.).PPThere are two syntaxes for formatting codes:.IP "\(bu" 4A formatting code starts with a capital letter (just US-ASCII [A\-Z])followed by a \*(L"<\*(R", any number of characters, and ending with the firstmatching \*(L">\*(R".  Examples:.Sp.Vb 1\&    That\*(Aqs what I<you> think!\&\&    What\*(Aqs C<dump()> for?\&\&    X<C<chmod> and C<unlink()> Under Different Operating Systems>.Ve.IP "\(bu" 4A formatting code starts with a capital letter (just US-ASCII [A\-Z])followed by two or more \*(L"<\*(R"'s, one or more whitespace characters,any number of characters, one or more whitespace characters,and ending with the first matching sequence of two or more \*(L">\*(R"'s, wherethe number of \*(L">\*(R"'s equals the number of \*(L"<\*(R"'s in the opening of thisformatting code.  Examples:.Sp.Vb 1\&    That\*(Aqs what I<< you >> think!\&\&    C<<< open(X, ">>thing.dat") || die $! >>>\&\&    B<< $foo\->bar(); >>.Ve.SpWith this syntax, the whitespace character(s) after the \*(L"C<<<\*(R"and before the \*(L">>\*(R" (or whatever letter) are \fInot\fR renderable \*(-- theydo not signify whitespace, are merely part of the formatting codesthemselves.  That is, these are all synonymous:.Sp.Vb 7\&    C<thing>\&    C<< thing >>\&    C<<           thing     >>\&    C<<<   thing >>>\&    C<<<<\&    thing\&               >>>>.Ve.Spand so on..PPIn parsing Pod, a notably tricky part is the correct parsing of(potentially nested!) formatting codes.  Implementors shouldconsult the code in the \f(CW\*(C`parse_text\*(C'\fR routine in Pod::Parser as anexample of a correct implementation..ie n .IP """I<text>"" \*(-- italic text" 4.el .IP "\f(CWI<text>\fR \*(-- italic text" 4.IX Item "I<text>  italic text"See the brief discussion in \*(L"Formatting Codes\*(R" in perlpod..ie n .IP """B<text>"" \*(-- bold text" 4.el .IP "\f(CWB<text>\fR \*(-- bold text" 4.IX Item "B<text>  bold text"See the brief discussion in \*(L"Formatting Codes\*(R" in perlpod..ie n .IP """C<code>"" \*(-- code text" 4.el .IP "\f(CWC<code>\fR \*(-- code text" 4.IX Item "C<code>  code text"See the brief discussion in \*(L"Formatting Codes\*(R" in perlpod..ie n .IP """F<filename>"" \*(-- style for filenames" 4.el .IP "\f(CWF<filename>\fR \*(-- style for filenames" 4.IX Item "F<filename>  style for filenames"See the brief discussion in \*(L"Formatting Codes\*(R" in perlpod..ie n .IP """X<topic name>"" \*(-- an index entry" 4.el .IP "\f(CWX<topic name>\fR \*(-- an index entry" 4.IX Item "X<topic name>  an index entry"See the brief discussion in \*(L"Formatting Codes\*(R" in perlpod..SpThis code is unusual in that most formatters completely discardthis code and its content.  Other formatters will render it withinvisible codes that can be used in building an index ofthe current document..ie n .IP """Z<>"" \*(-- a null (zero-effect) formatting code" 4.el .IP "\f(CWZ<>\fR \*(-- a null (zero-effect) formatting code" 4.IX Item "Z<>  a null (zero-effect) formatting code"Discussed briefly in \*(L"Formatting Codes\*(R" in perlpod..SpThis code is unusual is that it should have no content.  That is,a processor may complain if it sees \f(CW\*(C`Z<potatoes>\*(C'\fR.  Whetheror not it complains, the \fIpotatoes\fR text should ignored..ie n .IP """L<name>"" \*(-- a hyperlink" 4.el .IP "\f(CWL<name>\fR \*(-- a hyperlink" 4.IX Item "L<name>  a hyperlink"The complicated syntaxes of this code are discussed at length in\&\*(L"Formatting Codes\*(R" in perlpod, and implementation details arediscussed below, in \*(L"About L<...> Codes\*(R".  Parsing thecontents of L<content> is tricky.  Notably, the content has to bechecked for whether it looks like a \s-1URL\s0, or whether it has to be spliton literal \*(L"|\*(R" and/or \*(L"/\*(R" (in the right order!), and so on,\&\fIbefore\fR E<...> codes are resolved..ie n .IP """E<escape>"" \*(-- a character escape" 4.el .IP "\f(CWE<escape>\fR \*(-- a character escape" 4.IX Item "E<escape>  a character escape"See \*(L"Formatting Codes\*(R" in perlpod, and several points in\&\*(L"Notes on Implementing Pod Processors\*(R"..ie n .IP """S<text>"" \*(-- text contains non-breaking spaces" 4.el .IP "\f(CWS<text>\fR \*(-- text contains non-breaking spaces" 4.IX Item "S<text>  text contains non-breaking spaces"This formatting code is syntactically simple, but semanticallycomplex.  What it means is that each space in the printablecontent of this code signifies a non-breaking space.

⌨️ 快捷键说明

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