Subject: | Crash when rendering content |
The attached test case triggers an exceptions with Module::Path:
[guillaume@beria ~]$ perl test.pl
/usr/lib/perl5/vendor_perl/5.16.2/Module/Path.pm
Can't call method "present" without a package or object reference at
/usr/lib/perl5/vendor_perl/5.12.2/Pod/POM/View/Text.pm line 167
Subject: | test.pl |
#!/usr/bin/perl
use Pod::POM;
use Pod::POM::View::Text;
my $parser = Pod::POM->new();
my $pom = $parser->parse_file(shift);
foreach my $head1 ($pom->head1) {
next unless $head1->title eq 'DESCRIPTION';
my $pom = $head1->content();
my $text = $pom->present('Pod::POM::View::Text');
my @paragraphs = split /\n\n/, $text;
splice @paragraphs, 3 if @paragraphs > 3;
print join "\n\n", @paragraphs;
}