Frank Wiles wrote:
> .------[ Steve Gilbert wrote (2003/03/28 at 09:28:17) ]------
> >
> > Does anyone know of a way to enumerate all the
> > available modules on a system?
>
> I'm not sure why you'd want to do it, but does it.
>
> #!/usr/bin/perl
>
> use File::Find;
> my $count = 0;
>
> find(\&wanted, @INC);
>
> sub wanted {
> if( $_ =~ /\.pm$/ ) {
> print "$count: $File::Find::name\n";
> $count++;
> }
> }
That will effectively produce a list of the Perl module files
in the @INC directories, but they aren't necessarily modules
that you can usefully put in a 'use' statement.
I posted this a while ago, which may be what you want.
Rob Dixon wrote:
>
> This is a FAQ.
>
> As far as I'm concerned, by far the best way is to use
> ExtUtils::Installed like this:
>
> use ExtUtils::Installed;
> print "$_\n" foreach ExtUtils::Installed->new->modules;
Cheers,
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]