print "$id missing comma in NAME\n" if $tmp =~ /[^,] /;
my $dirname = dirname($filename);
- my $simplename = basename($filename);
- $simplename =~ s/.pod$//;
+ my $simplename = basename(basename($filename, ".in"), ".pod");
my $foundfilename = 0;
my %foundfilenames = ();
my %names;
$names{$n} = 1;
$foundfilename++ if $n eq $simplename;
$foundfilenames{$n} = 1
- if -f "$dirname/$n.pod" && $n ne $simplename;
+ if ((-f "$dirname/$n.pod.in" || -f "$dirname/$n.pod")
+ && $n ne $simplename);
}
- print "$id the following exist as other .pod files:\n",
+ print "$id the following exist as other .pod or .pod.in files:\n",
join(" ", sort keys %foundfilenames), "\n"
if %foundfilenames;
print "$id $simplename (filename) missing from NAME section\n"
my $dir = shift;
my %return;
- foreach my $pod ( glob("$dir/*.pod") ) {
+ foreach my $pod ( glob("$dir/*.pod"), glob("$dir/*.pod.in") ) {
my %podinfo = extract_pod_info($pod);
foreach my $n ( @{$podinfo{names}} ) {
$return{$n} = $pod;
my $filename = shift;
$filename =~ m|man(\d)/|;
my $section = $1;
- my $simplename = basename($filename, ".pod");
+ my $simplename = basename(basename($filename, ".in"), ".pod");
my $id = "${filename}:1:";
my $contents = '';
return;
}
$tmp =~ tr/\n/ /;
- $tmp =~ s/-.*//g;
+ $tmp =~ s/ -.*//g;
- my @names = map { s/^\s+//g; s/\s+$//g; $_ } split(/,/, $tmp);
+ my @names =
+ map { s|/|-|g; $_ } # Treat slash as dash
+ map { s/^\s+//g; s/\s+$//g; $_ } # Trim prefix and suffix blanks
+ split(/,/, $tmp);
unless (grep { $simplename eq $_ } @names) {
print "$id missing $simplename\n";
push @names, $simplename;
my $name_sec = "$name($section)";
if (! exists $name_collection{$name_sec}) {
$name_collection{$name_sec} = $filename;
- } else { #elsif ($filename ne $name_collection{$name_sec}) {
- print "$id $name_sec also in $name_collection{$name_sec}\n";
+ } elsif ($filename eq $name_collection{$name_sec}) {
+ print "$id $name_sec repeated in NAME section of $name_collection{$name_sec}\n"
+ } else {
+ print "$id $name_sec also in NAME section of $name_collection{$name_sec}\n";
}
}
}
if ( $opt_l ) {
- foreach (@ARGV ? @ARGV : (glob('doc/*/*.pod'),
+ foreach (@ARGV ? @ARGV : (glob('doc/*/*.pod'), glob('doc/*/*.pod.in'),
glob('doc/internal/*/*.pod'))) {
collectnames($_);
}
if ( $opt_n ) {
&publicize() if $opt_p;
- foreach (@ARGV ? @ARGV : glob('doc/*/*.pod')) {
+ foreach (@ARGV ? @ARGV : (glob('doc/*/*.pod'), glob('doc/*/*.pod.in'))) {
&check($_);
}
{