in reply to Command line option to list all modules?
Of course, if you don't have File::Find, try:use File::Find; $|++; find sub { print "$File::Find::name\n" if $_ =~ /\.pm$/ }, @INC;
$|++; while (@INC) { my $dir = shift @INC; opendir(MODDIR, $dir) or die "opendir $dir: $!"; @allfiles = readdir MODDIR; foreach (@allfiles) { $file = "$dir/$_"; next if $_ eq '.' or $_ eq '..'; unshift @INC, $file if -d $file; print "$file\n" if $_ =~ m/\.pm$/; } closedir MODDIR; }
-- Frag.
|
---|
Replies are listed 'Best First'. | |
---|---|
(ichimunki) Re x 2: Command line option to list all modules?
by ichimunki (Priest) on Aug 10, 2001 at 23:40 UTC |