#!/usr/bin/perl
# find_perl_modules.pl 2006.05.16
use File::Find;
find(\&wanted,@INC);
sub wanted
{
return unless ($File::Find::name =~ /\.pm$/);
open(MOD,$File::Find::name) or return;
while(<MOD>)
{
if (/^ *package +(\S+);/)
{
print $1 . "\n";
}
};
close(MOD);
};
评论