----- Original Message -----
From: "SPENCERS" <[EMAIL PROTECTED]>
To: "Beau E. Cox" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 19, 2003 6:46 PM
Subject: RE: Inatalled modules
> Here you are Beau,
>
> #!/usr/bin/perl -w
>
>
> # list all of the perl modules installed
>
> use strict;
> use File::Find ;
>
> for (@INC) { find(\&modules,$_) ; }
>
> sub modules
> {
> if (-d && /^[a-z]/) { $File::Find::prune = 1 ; return }
> return unless /\.pm$/ ;
> my $fullPath = "$File::Find::dir/$_";
> $fullPath =~ s!\.pm$!!;
> $fullPath =~ s#/(\w+)$#::$1# ;
> print "$fullPath \n";
> }
>
Thanks SPENCERS -
Works great.
I go un-lazy and plowed thru my archivies and
found my old script - uses Extutils::Installed so I
can vet the version installed too:
#!/usr/bin/perl
use strict;
use warnings;
use Extutils::Installed;
my $installed = ExtUtils::Installed->new();
for my $module (grep(!/^Perl$/, $installed->modules())) {
my $version = $installed->version($module) || "???";
print "$module Version $version\n";
}
I guess your script could be more accurate because
the Installed module relies on correct 'packlist' files...
Aloha => Beau;
== please visit ==
<http://beaucox.com> => main site
<http://howtos.beaucox.com> => howtos
<http://PPM.beaucox.com> => perl PPMs
<http://CPAN.beaucox.com> => CPAN
== thank you ==
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]