in reply to Listing all installed modules

Not exactly what you're looking for, but perldoc perllocal will show everything that you've installed with CPAN.

I've also seen a one-liner which does something more along the lines of what you are asking about, although it doesn't seem to return a complete list:

perl -MExtUtils::Installed -e'my $inst = ExtUtils::Installed->new(); print $_, $/ for $inst->modules'

Update: Actually, the second option that I gave does give a complete output. I forgot that ExtUtils::Installed uses "Perl" to represent the core modules. So you're still not technically getting a complete listing of all modules, but according to the method ExtUtils::Installed is using, the listing is complete.

Because of the method used by ExtUtils::Installed to represent the core, you are basically getting the same from both of the above options. The difference is that the second returns a nice, clean list, while the first is intended to be in a human-readable format.

Replies are listed 'Best First'.
Re: Re: Listing all installed modules
by Anonymous Monk on Feb 11, 2004 at 04:45 UTC
    beware of evil software that deletes perllocal (stupid Makefile.PL for Everything-base distribution)