This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
No need for buildtoc to scan ext/, now that it runs after the build process.
authorNicholas Clark <nick@ccl4.org>
Fri, 21 Jan 2011 10:51:53 +0000 (10:51 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 21 Jan 2011 10:59:06 +0000 (10:59 +0000)
Since 7eb47696deb9a734, buildtoc has been run as part of the build process,
hence it has all modules copied to lib/ from ext/ (dist/ and cpan/), where
its scan finds them.

Previously it was run by the committers as and when (and sometimes not often
enough), and the generated pod/perltoc.pod checked in. Hence it might be run
on a clean checkout, and so couldn't assume that everything would be in lib/

This scan of lib/ is why buildtoc can still pick up all the modules, despite
their migration to cpan/ and dist/, which it has no idea about.

Also, scanning lib/ rather than ext/ means that Pod for modules that are not
being installed on this platform won't be included, which makes for a more
accurate perltoc.pod

pod/buildtoc

index e9d543d..3ec77cf 100644 (file)
@@ -262,7 +262,7 @@ close MASTER;
 # Find all the modules
 {
   my @modpods;
-  find \&getpods => map {abs_from_top($_)} qw(lib/ ext/);
+  find \&getpods => abs_from_top('lib/');
 
   sub getpods {
     if (/\.p(od|m)$/) {
@@ -317,10 +317,9 @@ close MASTER;
 sub path2modname {
     local $_ = shift;
     s/\.p(m|od)$//;
-    s-.*?/(lib|ext)/--;
+    s-.*?/lib/--;
     s-/-::-g;
     s/(\w+)::\1/$1/;
-    s/-/::/g;
     return $_;
 }