=head1 NAME basic.pod - Test of various basic POD features in translators. =head1 HEADINGS Try a few different levels of headings, with embedded formatting codes and other interesting bits. =head1 This C a "level 1" heading =head2 ``Level'' "2 I =head3 Level 3 B>>> =head4 Level "4 C Now try again with B F. =head1 This C a "level 1" heading Text. =head2 ``Level'' 2 I Text. =head3 Level 3 B>>> Text. =head4 Level "4 C Text. =head1 LINKS These are all taken from the Pod::Parser tests. Try out I of different ways of specifying references: Reference the L Reference the L Reference the L Reference the L Reference the L<"manpage/section"> Reference the L<"manpage"/section> Reference the L Reference the L Reference the L Now try it using the new "|" stuff ... Reference the L| Reference the L| Reference the L| Reference the L| Reference the L| Reference the L| Reference the L| Reference the L| Reference the L| And then throw in a few new ones of my own. L L L L L L L L L L L<"boo var baz"> L L<"boo bar baz / baz boo"> L, L, and L Lbar> L|foo/bar> L text> LbarZ<>/Section C I markup>> L|fooEbar> =head1 OVER AND ITEMS Taken from Pod::Parser tests, this is a test to ensure that multiline =item paragraphs get indented appropriately. =over 4 =item This is a test. =back There should be whitespace now before this line. Taken from Pod::Parser tests, this is a test to ensure the nested =item paragraphs get indented appropriately. =over 2 =item 1 First section. =over 2 =item a this is item a =item b this is item b =back =item 2 Second section. =over 2 =item a this is item a =item b this is item b =item c =item d This is item c & d. =back =back Now some additional weirdness of our own. Make sure that multiple tags for one paragraph are properly compacted. =over 4 =item "foo" =item B =item C There shouldn't be any spaces between any of these item tags; this idiom is used in perlfunc. =item Some longer item text Just to make sure that we test paragraphs where the item text doesn't fit in the margin of the paragraph (and make sure that this paragraph fills a few lines). Let's also make it multiple paragraphs to be sure that works. =back Test use of =over without =item as a block "quote" or block paragraph. =over 4 This should be indented four spaces but otherwise formatted the same as any other regular text paragraph. Make sure it's long enough to see the results of the formatting..... =back Now try the same thing nested, and make sure that the indentation is reset back properly. =over 4 =over 4 This paragraph should be doubly indented. =back This paragraph should only be singly indented. =over 4 =item This is an item in the middle of a block-quote, which should be allowed. =item We're also testing tagless item commands. =back Should be back to the single level of indentation. =back Should 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 sure that item text wraps properly. =item * Another item. =back and now test the numbering of item blocks. =over 4 =item 1. First item. =item 2. Second item. =back =head1 FORMATTING CODES Another test taken from Pod::Parser. This is a test to see if I can do not only C<$self> and C, but also C<< $self->method() >> and C<< $self->{FIELDNAME} >> and C<< $Foo <=> $Bar >> without resorting to escape sequences. If I want to refer to the right-shift operator I can do something like 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 this C<<< $self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b] >>> Of course I should still be able to do all this I escape sequences too: C<$self-Emethod()> and C<$self-E{FIELDNAME}> and C<{FOO=EBAR}>. Dont forget C<$self-Emethod()-E{FIELDNAME} = {FOO=EBAR}>. 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 end up doing what you might expect since the first > will still terminate the first < seen. Lets make sure these work for empty ones too, like C<< >> and C<< >> >> (just to be obnoxious) The statement: C hour!> is a parody of a quotation from Winston Churchill. The following tests are added to those: Make sure that a few othZ<>er odd Ithings> still work. This should be a vertical bar: E. Here's a test of a few more special escapes that have to be supported: =over 3 =item E An ampersand. =item E An apostrophe. =item E A less-than sign. =item E A greater-than sign. =item E A double quotation mark. =item E A forward slash. =back Try to get this bit of text over towards the edge so S<|that all of this text inside SEE won't|> be wrapped. Also test the |sameEthingEwithEnon-breakingS< spaces>.| There is a soft hyEphen in hyphen at hy-phen. This is a test of an Xindex entry. =head1 VERBATIM Throw 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 next paragraph 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. Not starting with a tab. 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 on the text since otherwise text with mixed tabs and spaces will get messed up.) 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 CONCLUSION That's all, folks! =cut