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
# 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)$/) {
sub path2modname {
local $_ = shift;
s/\.p(m|od)$//;
- s-.*?/(lib|ext)/--;
+ s-.*?/lib/--;
s-/-::-g;
s/(\w+)::\1/$1/;
- s/-/::/g;
return $_;
}