1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
#!/usr/bin/perl -w # -*- perl -*-
use strict;
use lib qw( ./lib ../lib );
use Pod::POM::Test;
#$Pod::POM::Node::DEBUG = 1;
my $DEBUG = 1;
ntests(2);
my $text;
{ local $/ = undef;
$text = <DATA>;
}
my $parser = Pod::POM->new();
my $pom = $parser->parse_text($text);
assert( defined $pom );
# something of a crap test...
match( length $pom, 1898 );
__DATA__
=head1 NAME
A test Pod document.
=head1 NAME
My::Module - a sample Pod document for testing Pod::POM
=head1 SYNOPSIS
use My::Module;
my $module = My::Module->new();
my $item = $module->item();
=head1 DESCRIPTION
This is a sample Pod document for testing the Pod::POM module.
Here is a verbatim section, indented from the left margin
by some whitespace
This is some more regular text.
Here is some B<bold> text, some I<italic> and something that looks
like an E<lt>htmlE<gt> tag. This is some C<$code($arg1)>.
This C<text contains embedded B<bold> and I<italic> tags>. These can
be nested, allowing B<bold and I<bold/italic> text>. The module also
supports the extended B<< syntax >> and permits I<< nested tags E<amp>
other B<<< cool >>> stuff >>
=head1 METHODS =E<gt> OTHER STUFF
Here is a list of methods
=head2 new()
Constructor method. Accepts the following config options:
=over 4
=item foo
The foo item.
=item bar
The bar item.
=over 4
This is a list within a list
=item wiz
The wiz item.
=item waz
The waz item.
=back
=item baz
The baz item.
=back
=head2 old()
Destructor method
=head1 IMPORTANT STUFF
Here is some important stuff.
=over 4
=item Chew Your Food
Always chew your food properly before swallowing.
=item Running With Scissors
Don't run with scissors.
=back
=head1 TESTING FOR AND BEGIN
=for html <br>
<p>
blah blah
</p>
intermediate text
=begin html
<more>
HTML
</more>
some text
=end
=head1 AUTHOR
Andy Wardley E<lt>abw@kfs.orgE<gt>.
=head1 VERSION
This is version 0.1 of My::Module.
I like being S<spaced out, like man>, wow.
=head1 COPYRIGHT
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 SEE ALSO
See also L<pod2|Test Page 2>, L<Your::Module>, L<Their::Module> and the
file F</usr/local/my/module/rocks> as well.
=cut
|