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

📄 basic.pod

📁 source of perl for linux application,
💻 POD
字号:
=head1 NAMEbasic.pod - Test of various basic POD features in translators.=head1 HEADINGSTry a few different levels of headings, with embedded formatting codes andother interesting bits.=head1 This C<is> a "level 1" heading=head2 ``Level'' "2 I<heading>=head3 Level 3 B<heading I<with C<weird F<stuff "" (double quote)>>>>=head4 Level "4 C<heading>Now try again with B<intermixed> F<text>.=head1 This C<is> a "level 1" headingText.=head2 ``Level'' 2 I<heading>Text.=head3 Level 3 B<heading I<with C<weird F<stuff>>>>Text.=head4 Level "4 C<heading>Text.=head1 LINKSThese are all taken from the Pod::Parser tests.Try out I<LOTS> of different ways of specifying references:Reference the L<manpage/section>Reference the L<"manpage"/section>Reference the L<manpage/"section">Now try it using the new "|" stuff ...Reference the L<thistext|manpage/section>|Reference the L<thistext | manpage / section>|Reference the L<thistext| manpage/ section>|Reference the L<thistext |manpage /section>|Reference the L<thistext|manpage/"section">|Reference the L<thistext|manpage/section>|And then throw in a few new ones of my own.L<foo>L<foo|bar>L<foo/bar>L<foo/"baz boo">L</bar>L</"baz boo">L</baz boo>L<foo bar/baz boo>L<"boo var baz">L<bar baz>L</boo>, L</bar>, and L</baz>L<fooZ<>bar>L<Testing I<italics>|foo/bar>L<foo/I<Italic> text>L<fooE<verbar>barZ<>/Section C<with> I<B<other> markup>>L<Nested L<http://www.perl.org/>|fooE<sol>bar>=head1 OVER AND ITEMSTaken from Pod::Parser tests, this is a test to ensure that multiline=item paragraphs get indented appropriately.=over 4 =item This isatest.=backThere should be whitespace now before this line.Taken from Pod::Parser tests, this is a test to ensure the nested =itemparagraphs get indented appropriately.=over 2=item 1First section.=over 2=item athis is item a=item bthis is item b=back=item 2Second section.=over 2=item athis is item a=item bthis is item b=item c=item dThis is item c & d.=back=backNow some additional weirdness of our own.  Make sure that multiple tagsfor one paragraph are properly compacted.=over 4=item "foo"=item B<bar>=item C<baz>There shouldn't be any spaces between any of these item tags; this idiomis used in perlfunc.=item Some longer item textJust to make sure that we test paragraphs where the item text doesn't fitin the margin of the paragraph (and make sure that this paragraph fills afew lines).Let's also make it multiple paragraphs to be sure that works.=backTest use of =over without =item as a block "quote" or block paragraph.=over 4This should be indented four spaces but otherwise formatted the same asany other regular text paragraph.  Make sure it's long enough to see theresults of the formatting.....=backNow try the same thing nested, and make sure that the indentation is resetback properly.=over 4=over 4This paragraph should be doubly indented.=backThis paragraph should only be singly indented.=over 4=itemThis is an item in the middle of a block-quote, which should be allowed.=itemWe're also testing tagless item commands.=backShould be back to the single level of indentation.=backShould be back to regular indentation.Now also check the transformation of * into real bullets for man pages.=over=item *An item.  We're also testing using =over without a number, and making surethat item text wraps properly.=item *Another item.=backand now test the numbering of item blocks.=over 4=item 1.First item.=item 2.Second item.=back=head1 FORMATTING CODESAnother test taken from Pod::Parser.This is a test to see if I can do not only C<$self> and C<method()>, butalso C<< $self->method() >> and C<< $self->{FIELDNAME} >> andC<< $Foo <=> $Bar >> without resorting to escape sequences. If I want to refer to the right-shift operator I can do somethinglike C<<< $x >> 3 >>> or even C<<<< $y >> 5 >>>>.Now for the grand finale of C<< $self->method()->{FIELDNAME} = {FOO=>BAR} >>.And I also want to make sure that newlines work like thisC<<<$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]>>>Of course I should still be able to do all this I<with> escape sequencestoo: C<$self-E<gt>method()> and C<$self-E<gt>{FIELDNAME}> andC<{FOO=E<gt>BAR}>.Dont forget C<$self-E<gt>method()-E<gt>{FIELDNAME} = {FOO=E<gt>BAR}>.And make sure that C<0> works too!Now, if I use << or >> as my delimiters, then I have to use whitespace.So things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> wont endup doing what you might expect since the first > will still terminatethe first < seen.Lets make sure these work for empty ones too, like C<<  >> and C<< >> >>(just to be obnoxious)The statement: C<This is dog kind's I<finest> hour!> is a parody of aquotation from Winston Churchill.The following tests are added to those:Make sure that a few othZ<>er odd I<Z<>things> still work.  This should bea vertical bar:  E<verbar>.  Here's a test of a few more special escapesthat have to be supported:=over 3=item E<amp>An ampersand.=item E<apos>An apostrophe.=item E<lt>A less-than sign.=item E<gt>A greater-than sign.=item E<quot>A double quotation mark.=item E<sol>A forward slash.=backTry to get this bit of text over towards the edge so S<|that all of thistext inside SE<lt>E<gt> won't|> be wrapped.  Also test the|sameE<nbsp>thingE<nbsp>withE<nbsp>non-breakingS< spaces>.|There is a soft hyE<shy>phen in hyphen at hy-phen.This is a test of an X<index entry>index entry.=head1 VERBATIMThrow in a few verbatim paragraphs.    use Term::ANSIColor;    print color 'bold blue';    print "This text is bold blue.\n";    print color 'reset';    print "This text is normal.\n";    print colored ("Yellow on magenta.\n", 'yellow on_magenta');    print "This text is normal.\n";    print colored ['yellow on_magenta'], "Yellow on magenta.\n";    use Term::ANSIColor qw(uncolor);    print uncolor '01;31', "\n";But this isn't verbatim (make sure it wraps properly), and the nextparagraph is again:    use Term::ANSIColor qw(:constants);    print BOLD, BLUE, "This text is in bold blue.\n", RESET;    use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";(Ugh, that's obnoxiously long.)  Try different spacing:	Starting with a tab.Notstartingwithatab.  But this should still be verbatim. As should this.This isn't. This is.  And this:	is an internal tab.  It should be:                    |--| <= lined up with that.(Tricky, but tabs should be expanded before the translator starts in onthe text since otherwise text with mixed tabs and spaces will get messedup.)    And now we test verbatim paragraphs right before a heading.  Older    versions of Pod::Man generated two spaces between paragraphs like this    and the heading.  (In order to properly test this, one may have to    visually inspect the nroff output when run on the generated *roff    text, unfortunately.)=head1 CONCLUSIONThat's all, folks!=cut

⌨️ 快捷键说明

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