1N/A=head1 NAME
1N/A
1N/Abasic.pod - Test of various basic POD features in translators.
1N/A
1N/A=head1 HEADINGS
1N/A
1N/ATry a few different levels of headings, with embedded formatting codes and
1N/Aother interesting bits.
1N/A
1N/A=head1 This C<is> a "level 1" heading
1N/A
1N/A=head2 ``Level'' "2 I<heading>
1N/A
1N/A=head3 Level 3 B<heading I<with C<weird F<stuff "" (double quote)>>>>
1N/A
1N/A=head4 Level "4 C<heading>
1N/A
1N/ANow try again with B<intermixed> F<text>.
1N/A
1N/A=head1 This C<is> a "level 1" heading
1N/A
1N/AText.
1N/A
1N/A=head2 ``Level'' 2 I<heading>
1N/A
1N/AText.
1N/A
1N/A=head3 Level 3 B<heading I<with C<weird F<stuff>>>>
1N/A
1N/AText.
1N/A
1N/A=head4 Level "4 C<heading>
1N/A
1N/AText.
1N/A
1N/A=head1 LINKS
1N/A
1N/AThese are all taken from the Pod::Parser tests.
1N/A
1N/ATry out I<LOTS> of different ways of specifying references:
1N/A
1N/AReference the L<manpage/section>
1N/A
1N/AReference the L<manpage / section>
1N/A
1N/AReference the L<manpage/ section>
1N/A
1N/AReference the L<manpage /section>
1N/A
1N/AReference the L<"manpage/section">
1N/A
1N/AReference the L<"manpage"/section>
1N/A
1N/AReference the L<manpage/"section">
1N/A
1N/AReference the L<manpage/
1N/Asection>
1N/A
1N/AReference the L<manpage
1N/A/section>
1N/A
1N/ANow try it using the new "|" stuff ...
1N/A
1N/AReference the L<thistext|manpage/section>|
1N/A
1N/AReference the L<thistext | manpage / section>|
1N/A
1N/AReference the L<thistext| manpage/ section>|
1N/A
1N/AReference the L<thistext |manpage /section>|
1N/A
1N/AReference the L<thistext|
1N/A"manpage/section">|
1N/A
1N/AReference the L<thistext
1N/A|"manpage"/section>|
1N/A
1N/AReference the L<thistext|manpage/"section">|
1N/A
1N/AReference the L<thistext|
1N/Amanpage/
1N/Asection>|
1N/A
1N/AReference the L<thistext
1N/A|manpage
1N/A/section>|
1N/A
1N/AAnd then throw in a few new ones of my own.
1N/A
1N/AL<foo>
1N/A
1N/AL<foo|bar>
1N/A
1N/AL<foo/bar>
1N/A
1N/AL<foo/"baz boo">
1N/A
1N/AL</bar>
1N/A
1N/AL</"baz boo">
1N/A
1N/AL</baz boo>
1N/A
1N/AL<foo bar/baz boo>
1N/A
1N/AL<foo bar / baz boo>
1N/A
1N/AL<foo
1N/Abar
1N/Abaz
1N/A/
1N/Aboo>
1N/A
1N/AL<"boo var baz">
1N/A
1N/AL<bar baz>
1N/A
1N/AL<"boo bar baz / baz boo">
1N/A
1N/AL</boo>, L</bar>, and L</baz>
1N/A
1N/AL<fooZ<>bar>
1N/A
1N/AL<Testing I<italics>|foo/bar>
1N/A
1N/AL<foo/I<Italic> text>
1N/A
1N/AL<fooE<verbar>barZ<>/Section C<with> I<B<other> markup>>
1N/A
1N/AL<Nested L<http://www.perl.org/>|fooE<sol>bar>
1N/A
1N/A=head1 OVER AND ITEMS
1N/A
1N/ATaken from Pod::Parser tests, this is a test to ensure that multiline
1N/A=item paragraphs get indented appropriately.
1N/A
1N/A=over 4
1N/A
1N/A=item This
1N/Ais
1N/Aa
1N/Atest.
1N/A
1N/A=back
1N/A
1N/AThere should be whitespace now before this line.
1N/A
1N/ATaken from Pod::Parser tests, this is a test to ensure the nested =item
1N/Aparagraphs get indented appropriately.
1N/A
1N/A=over 2
1N/A
1N/A=item 1
1N/A
1N/AFirst section.
1N/A
1N/A=over 2
1N/A
1N/A=item a
1N/A
1N/Athis is item a
1N/A
1N/A=item b
1N/A
1N/Athis is item b
1N/A
1N/A=back
1N/A
1N/A=item 2
1N/A
1N/ASecond section.
1N/A
1N/A=over 2
1N/A
1N/A=item a
1N/A
1N/Athis is item a
1N/A
1N/A=item b
1N/A
1N/Athis is item b
1N/A
1N/A=item c
1N/A
1N/A=item d
1N/A
1N/AThis is item c & d.
1N/A
1N/A=back
1N/A
1N/A=back
1N/A
1N/ANow some additional weirdness of our own. Make sure that multiple tags
1N/Afor one paragraph are properly compacted.
1N/A
1N/A=over 4
1N/A
1N/A=item "foo"
1N/A
1N/A=item B<bar>
1N/A
1N/A=item C<baz>
1N/A
1N/AThere shouldn't be any spaces between any of these item tags; this idiom
1N/Ais used in perlfunc.
1N/A
1N/A=item Some longer item text
1N/A
1N/AJust to make sure that we test paragraphs where the item text doesn't fit
1N/Ain the margin of the paragraph (and make sure that this paragraph fills a
1N/Afew lines).
1N/A
1N/ALet's also make it multiple paragraphs to be sure that works.
1N/A
1N/A=back
1N/A
1N/ATest use of =over without =item as a block "quote" or block paragraph.
1N/A
1N/A=over 4
1N/A
1N/AThis should be indented four spaces but otherwise formatted the same as
1N/Aany other regular text paragraph. Make sure it's long enough to see the
1N/Aresults of the formatting.....
1N/A
1N/A=back
1N/A
1N/ANow try the same thing nested, and make sure that the indentation is reset
1N/Aback properly.
1N/A
1N/A=over 4
1N/A
1N/A=over 4
1N/A
1N/AThis paragraph should be doubly indented.
1N/A
1N/A=back
1N/A
1N/AThis paragraph should only be singly indented.
1N/A
1N/A=over 4
1N/A
1N/A=item
1N/A
1N/AThis is an item in the middle of a block-quote, which should be allowed.
1N/A
1N/A=item
1N/A
1N/AWe're also testing tagless item commands.
1N/A
1N/A=back
1N/A
1N/AShould be back to the single level of indentation.
1N/A
1N/A=back
1N/A
1N/AShould be back to regular indentation.
1N/A
1N/ANow also check the transformation of * into real bullets for man pages.
1N/A
1N/A=over
1N/A
1N/A=item *
1N/A
1N/AAn item. We're also testing using =over without a number, and making sure
1N/Athat item text wraps properly.
1N/A
1N/A=item *
1N/A
1N/AAnother item.
1N/A
1N/A=back
1N/A
1N/Aand now test the numbering of item blocks.
1N/A
1N/A=over 4
1N/A
1N/A=item 1.
1N/A
1N/AFirst item.
1N/A
1N/A=item 2.
1N/A
1N/ASecond item.
1N/A
1N/A=back
1N/A
1N/A=head1 FORMATTING CODES
1N/A
1N/AAnother test taken from Pod::Parser.
1N/A
1N/AThis is a test to see if I can do not only C<$self> and C<method()>, but
1N/Aalso C<< $self->method() >> and C<< $self->{FIELDNAME} >> and
1N/AC<< $Foo <=> $Bar >> without resorting to escape sequences. If
1N/AI want to refer to the right-shift operator I can do something
1N/Alike C<<< $x >> 3 >>> or even C<<<< $y >> 5 >>>>.
1N/A
1N/ANow for the grand finale of C<< $self->method()->{FIELDNAME} = {FOO=>BAR} >>.
1N/AAnd I also want to make sure that newlines work like this
1N/AC<<<
1N/A$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]
1N/A>>>
1N/A
1N/AOf course I should still be able to do all this I<with> escape sequences
1N/Atoo: C<$self-E<gt>method()> and C<$self-E<gt>{FIELDNAME}> and
1N/AC<{FOO=E<gt>BAR}>.
1N/A
1N/ADont forget C<$self-E<gt>method()-E<gt>{FIELDNAME} = {FOO=E<gt>BAR}>.
1N/A
1N/AAnd make sure that C<0> works too!
1N/A
1N/ANow, if I use << or >> as my delimiters, then I have to use whitespace.
1N/ASo things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> wont end
1N/Aup doing what you might expect since the first > will still terminate
1N/Athe first < seen.
1N/A
1N/ALets make sure these work for empty ones too, like C<< >> and C<< >> >>
1N/A(just to be obnoxious)
1N/A
1N/AThe statement: C<This is dog kind's I<finest> hour!> is a parody of a
1N/Aquotation from Winston Churchill.
1N/A
1N/AThe following tests are added to those:
1N/A
1N/AMake sure that a few othZ<>er odd I<Z<>things> still work. This should be
1N/Aa vertical bar: E<verbar>. Here's a test of a few more special escapes
1N/Athat have to be supported:
1N/A
1N/A=over 3
1N/A
1N/A=item E<amp>
1N/A
1N/AAn ampersand.
1N/A
1N/A=item E<apos>
1N/A
1N/AAn apostrophe.
1N/A
1N/A=item E<lt>
1N/A
1N/AA less-than sign.
1N/A
1N/A=item E<gt>
1N/A
1N/AA greater-than sign.
1N/A
1N/A=item E<quot>
1N/A
1N/AA double quotation mark.
1N/A
1N/A=item E<sol>
1N/A
1N/AA forward slash.
1N/A
1N/A=back
1N/A
1N/ATry to get this bit of text over towards the edge so S<|that all of this
1N/Atext inside SE<lt>E<gt> won't|> be wrapped. Also test the
1N/A|sameE<nbsp>thingE<nbsp>withE<nbsp>non-breakingS< spaces>.|
1N/A
1N/AThere is a soft hyE<shy>phen in hyphen at hy-phen.
1N/A
1N/AThis is a test of an X<index entry>index entry.
1N/A
1N/A=head1 VERBATIM
1N/A
1N/AThrow in a few verbatim paragraphs.
1N/A
1N/A use Term::ANSIColor;
1N/A print color 'bold blue';
1N/A print "This text is bold blue.\n";
1N/A print color 'reset';
1N/A print "This text is normal.\n";
1N/A print colored ("Yellow on magenta.\n", 'yellow on_magenta');
1N/A print "This text is normal.\n";
1N/A print colored ['yellow on_magenta'], "Yellow on magenta.\n";
1N/A
1N/A use Term::ANSIColor qw(uncolor);
1N/A print uncolor '01;31', "\n";
1N/A
1N/ABut this isn't verbatim (make sure it wraps properly), and the next
1N/Aparagraph is again:
1N/A
1N/A use Term::ANSIColor qw(:constants);
1N/A print BOLD, BLUE, "This text is in bold blue.\n", RESET;
1N/A
1N/A 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";
1N/A
1N/A(Ugh, that's obnoxiously long.) Try different spacing:
1N/A
1N/A Starting with a tab.
1N/ANot
1N/Astarting
1N/Awith
1N/Aa
1N/Atab. But this should still be verbatim.
1N/A As should this.
1N/A
1N/AThis isn't.
1N/A
1N/A This is. And this: is an internal tab. It should be:
1N/A |--| <= lined up with that.
1N/A
1N/A(Tricky, but tabs should be expanded before the translator starts in on
1N/Athe text since otherwise text with mixed tabs and spaces will get messed
1N/Aup.)
1N/A
1N/A And now we test verbatim paragraphs right before a heading. Older
1N/A versions of Pod::Man generated two spaces between paragraphs like this
1N/A and the heading. (In order to properly test this, one may have to
1N/A visually inspect the nroff output when run on the generated *roff
1N/A text, unfortunately.)
1N/A
1N/A=head1 CONCLUSION
1N/A
1N/AThat's all, folks!
1N/A
1N/A=cut