diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-11-27 13:05:11 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-11-27 13:05:11 +0100 |
commit | 2db7c483adfe796023e6b117428d28c725186f04 (patch) | |
tree | 131c1767318fb4cc9fdeec967993e45d1af36e4e /pod/buildtoc | |
parent | cf220710f187d33f81fc50e0e898134558c7bf62 (diff) | |
download | perl-2db7c483adfe796023e6b117428d28c725186f04.tar.gz |
Fix two post 5.15.0 perltoc.pod generation bugs.
Commit 1721346e4e420217, which allowed buildtoc to handle files outside of
pod, changed the number of entries in the master structure, but missed
changing one test from 3 to 5, which resulted in all the core documentation
being omitted from the generated perltoc.pod
Commit f37610d895e1d30b, which eliminated the use of absolute pathnames,
failed to change two regular expressions in the subroutine passed to
File::Find::find(), which resulted in all module pod filenames having
lib/ prepended, and thus all modules being treated as pragmata.
This commit also contained an error in the call to podset() for the core
documentation, which wasn't noticed because that code was never called,
due to the bug introduced by commit 1721346e4e420217.
perltoc.pod now builds correctly once again. Whether anyone uses it is
another matter.
Diffstat (limited to 'pod/buildtoc')
-rw-r--r-- | pod/buildtoc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pod/buildtoc b/pod/buildtoc index 930cf70d85..29c8bc89f8 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -30,7 +30,7 @@ my @modpods; find(sub { if (/\.p(od|m)$/) { my $file = $File::Find::name; - return if $file =~ qr!/lib/Pod/Functions.pm\z!; # Used only by pod itself + return if $file =~ qr!/Pod/Functions.pm\z!; # Used only by pod itself return if $file =~ m!(?:^|/)t/!; return if $file =~ m!lib/Attribute/Handlers/demo/!; return if $file =~ m!lib/Net/FTP/.+\.pm!; # Hi, Graham! :-) @@ -62,7 +62,7 @@ my %done; for (@modpods) { my $name = $_; $name =~ s/\.p(m|od)$//; - $name =~ s-.*?/lib/--; + $name =~ s-\Alib/--; $name =~ s-/-::-g; next if $done{$name}++; @@ -98,8 +98,8 @@ my $OUT; EOPOD2B # All the things in the master list that happen to be pod filenames -foreach (grep {defined $_ && @$_ == 3 && !$_->[0]{toc_omit}} @{$state->{master}}) { - podset(@$_); +foreach (grep {defined $_ && @$_ == 5 && !$_->[0]{toc_omit}} @{$state->{master}}) { + podset($_->[1], $_->[2]); } foreach my $type (qw(PRAGMA MODULE)) { |