📄 pod::simple::subclassing.3
字号:
.Sp.Vb 3\& <L content\-implicit="yes" to="http://www.perl.com/CPAN/authors/" type="url">\& http://www.perl.com/CPAN/authors/\& </L>.Ve.SpWhen a L<\fImanpage(section)\fR> code is parsed (and these arefairly rare and not terribly useful), it produces this event structure:.Sp.Vb 3\& <L content\-implicit="yes" to="manpage(section)" type="man">\& manpage(section)\& </L>.Ve.SpThe \f(CW\*(C`type="man"\*(C'\fR attribute is always specified for this type ofL code..SpFor example, this Pod source:.Sp.Vb 1\& L<crontab(5)>.Ve.Spproduces this event structure:.Sp.Vb 3\& <L content\-implicit="yes" to="crontab(5)" type="man">\& crontab(5)\& </L>.Ve.SpIn the rare cases where a man page link has a specified, that text appearsin a \fIsection\fR attribute. For example, this Pod source:.Sp.Vb 1\& L<crontab(5)/"ENVIRONMENT">.Ve.Spwill produce this event structure:.Sp.Vb 3\& <L content\-implicit="yes" section="ENVIRONMENT" to="crontab(5)" type="man">\& "ENVIRONMENT" in crontab(5)\& </L>.Ve.SpIn the rare case where the Pod document has code likeL<\fIsometext\fR|\fImanpage(section)\fR>, then the \fIsometext\fR will appearas the content of the element, the \fImanpage(section)\fR text will appearonly as the value of the \fIto\fR attribute, and there will be no\&\f(CW\*(C`content\-implicit="yes"\*(C'\fR attribute (whose presence means that the Pod parserhad to infer what text should appear as the link text \*(-- as opposed tocases where that attribute is absent, which means that the Pod parser did\&\fInot\fR have to infer the link text, because that L code explicitly specifiedsome link text.).SpFor example, this Pod source:.Sp.Vb 1\& L<hell itself!|crontab(5)>.Ve.Spwill produce this event structure:.Sp.Vb 3\& <L to="crontab(5)" type="man">\& hell itself!\& </L>.Ve.SpThe last type of L structure is for links to/within Pod documents. It isthe most complex because it can have a \fIto\fR attribute, \fIor\fR a\&\fIsection\fR attribute, or both. The \f(CW\*(C`type="pod"\*(C'\fR attribute is alwaysspecified for this type of L code..SpIn the most common case, the simple case of a L<podpage> codeproduces this event structure:.Sp.Vb 3\& <L content\-implicit="yes" to="Net::Ping" type="pod">\& podpage\& </L>.Ve.SpFor example, this Pod source:.Sp.Vb 1\& L<Net::Ping>.Ve.Spproduces this event structure:.Sp.Vb 3\& <L content\-implicit="yes" to="Net::Ping" type="pod">\& Net::Ping\& </L>.Ve.SpIn cases where there is link-text explicitly specified, itis to be found in the content of the element (and not theattributes), just as with the L<\fIsometext\fR|\fImanpage(section)\fR>case discussed above. For example, this Pod source:.Sp.Vb 1\& L<Perl Error Messages|perldiag>.Ve.Spproduces this event structure:.Sp.Vb 3\& <L to="perldiag" type="pod">\& Perl Error Messages\& </L>.Ve.SpIn cases of links to a section in the current Pod document,there is a \fIsection\fR attribute instead of a \fIto\fR attribute.For example, this Pod source:.Sp.Vb 1\& L</"Member Data">.Ve.Spproduces this event structure:.Sp.Vb 3\& <L content\-implicit="yes" section="Member Data" type="pod">\& "Member Data"\& </L>.Ve.SpAs another example, this Pod source:.Sp.Vb 1\& L<the various attributes|/"Member Data">.Ve.Spproduces this event structure:.Sp.Vb 3\& <L section="Member Data" type="pod">\& the various attributes\& </L>.Ve.SpIn cases of links to a section in a different Pod document,there are both a \fIsection\fR attribute and a to attribute.For example, this Pod source:.Sp.Vb 1\& L<perlsyn/"Basic BLOCKs and Switch Statements">.Ve.Spproduces this event structure:.Sp.Vb 3\& <L content\-implicit="yes" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">\& "Basic BLOCKs and Switch Statements" in perlsyn\& </L>.Ve.SpAs another example, this Pod source:.Sp.Vb 1\& L<SWITCH statements|perlsyn/"Basic BLOCKs and Switch Statements">.Ve.Spproduces this event structure:.Sp.Vb 3\& <L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">\& SWITCH statements\& </L>.Ve.SpIncidentally, note that we do not distinguish between these syntaxes:.Sp.Vb 4\& L</"Member Data">\& L<"Member Data">\& L</Member Data>\& L<Member Data> [deprecated syntax].Ve.SpThat is, they all produce the same event structure, namely:.Sp.Vb 3\& <L content\-implicit="yes" section="Member Data" type="pod">\& "Member Data"\& </L>.Ve.IP "events with an element_name of E or Z" 4.IX Item "events with an element_name of E or Z"While there are Pod codes E<...> and Z<>, these\&\fIdo not\fR produce any E or Z events \*(-- that is, there are no suchevents as E or Z..IP "events with an element_name of Verbatim" 4.IX Item "events with an element_name of Verbatim"When a Pod verbatim paragraph (\s-1AKA\s0 \*(L"codeblock\*(R") is parsed, itproduces this event structure:.Sp.Vb 3\& <Verbatim start_line="543" xml:space="preserve">\& ...text...\& </Verbatim>.Ve.SpThe value of the \fIstart_line\fR attribute will be the line number of thefirst line of this verbatim block. The \fIxml:space\fR attribute is alwayspresent, and always has the value \*(L"preserve\*(R"..SpThe text content will have tabs already expanded..IP "events with an element_name of head1 .. head4" 4.IX Item "events with an element_name of head1 .. head4"When a \*(L"=head1 ...\*(R" directive is parsed, it produces this eventstructure:.Sp.Vb 3\& <head1>\& ...stuff...\& </head1>.Ve.SpFor example, a directive consisting of this:.Sp.Vb 1\& =head1 Options to C<new> et al..Ve.Spwill produce this event structure:.Sp.Vb 7\& <head1 start_line="543">\& Options to \& <C>\& new\& </C>\& et al.\& </head1>.Ve.Sp\&\*(L"=head2\*(R" thru \*(L"=head4\*(R" directives are the same, except for the elementnames in the event structure..IP "events with an element_name of over-bullet" 4.IX Item "events with an element_name of over-bullet"When an \*(L"=over ... =back\*(R" block is parsed where the items area bulletted list, it will produce this event structure:.Sp.Vb 6\& <over\-bullet indent="4" start_line="543">\& <item\-bullet start_line="545">\& ...Stuff...\& </item\-bullet>\& ...more item\-bullets...\& </over\-bullet>.Ve.SpThe value of the \fIindent\fR attribute is whatever value is after the\&\*(L"=over\*(R" directive, as in \*(L"=over 8\*(R". If no such value is specifiedin the directive, then the \fIindent\fR attribute has the value \*(L"4\*(R"..SpFor example, this Pod source:.Sp.Vb 1\& =over\&\& =item *\&\& Stuff\&\& =item *\&\& Bar I<baz>!\&\& =back.Ve.Spproduces this event structure:.Sp.Vb 8\& <over\-bullet indent="4" start_line="10">\& <item\-bullet start_line="12">\& Stuff\& </item\-bullet>\& <item\-bullet start_line="14">\& Bar <I>baz</I>!\& </item\-bullet>\& </over\-bullet>.Ve.IP "events with an element_name of over-number" 4.IX Item "events with an element_name of over-number"When an \*(L"=over ... =back\*(R" block is parsed where the items area numbered list, it will produce this event structure:.Sp.Vb 6\& <over\-number indent="4" start_line="543">\& <item\-number number="1" start_line="545">\& ...Stuff...\& </item\-number>\& ...more item\-number...\& </over\-bullet>.Ve.SpThis is like the \*(L"over-bullet\*(R" event structure; but note that the contentsare \*(L"item-number\*(R" instead of \*(L"item-bullet\*(R", and note that they will havea \*(L"number\*(R" attribute, which some formatters/processors may ignore(since, for example, there's no need for it in \s-1HTML\s0 when producingan \*(L"<\s-1UL\s0><\s-1LI\s0>...</LI>...</UL>\*(R" structure), but which any processor may use..SpNote that the values for the \fInumber\fR attributes of \*(L"item-number\*(R"elements in a given \*(L"over-number\*(R" area \fIwill\fR start at 1 and go up byone each time. If the Pod source doesn't follow that order (even thoughit really should should!), whatever numbers it has will be ignored (withthe correct values being put in the \fInumber\fR attributes), and an errormessage might be issued to the user..IP "events with an element_name of over-text" 4.IX Item "events with an element_name of over-text"These events are are somewhat unlike the other over\-*structures, as far as what their contents are. Whenan \*(L"=over ... =back\*(R" block is parsed where the items area list of text \*(L"subheadings\*(R", it will produce this event structure:.Sp.Vb 8\& <over\-text indent="4" start_line="543">\& <item\-text>\& ...stuff...\& </item\-text>\& ...stuff (generally Para or Verbatim elements)...\& <item\-text>\& ...more item\-text and/or stuff...\& </over\-text>.Ve.SpThe \fIindent\fR attribute is as with the other over\-* events..SpFor example, this Pod source:.Sp.Vb 1\& =over\& \& =item Foo\& \& Stuff\& \& =item Bar I<baz>!\& \& Quux\& \& =back.Ve.Spproduces this event structure:.Sp.Vb 10\& <over\-text indent="4" start_line="20">\& <item\-text start_line="22">\& Foo\& </item\-text>\& <Para start_line="24">\& Stuff\& </Para>\& <item\-text start_line="26">\& Bar\& <I>\& baz\& </I>\& !\& </item\-text>\& <Para start_line="28">\& Quux
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -