Subject: | L<login.conf(5)> expect type "man" |
Date: | Sun, 27 Jan 2013 09:23:14 +1100 |
To: | bug-Pod-Simple [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
With recent debian i386 Pod::Simple 3.22 and perl 5.14.2, the program
foo.pl below prints for the L<login.conf(5)> link
'type' => 'pod',
where I expected it to be type "man".
Various man page names have dots "." in them, some because they're
filenames like login.conf, others because they're version numbers like
"gcc-2.95". You'd be tempted to loosen up the man pattern so that
almost anything ending with parens like L<..(...)>, without a "/", is a
man page.
Dave Rolsky struck this with login.conf(5) per
https://rt.cpan.org/Ticket/Display.html?id=82972
use strict;
use warnings;
{
package MyParser;
use base 'Pod::Simple';
use Data::Dumper;
sub _handle_element_start {
my ($self, $element_name, $attr_hash) = @_;
print "$element_name\n";
print Data::Dumper->Dump([$attr_hash]);
print "\n";
}
}
my $parser = MyParser->new();
$parser->parse_string_document(<<HERE);
=pod
L<login.conf(5)>
HERE
exit 0;