what perl modules are installed

Ian Docherty londonperlmongers at iandocherty.com
Wed Feb 13 20:20:37 GMT 2008


Matt Lawrence wrote:
> Adriano Ferreira wrote:
>> On Feb 13, 2008 12:09 PM, Edwardson, Tony
>> <Tony.Edwardson at commerzbank.com> wrote:
>>  
>>> I use the following
>>>
>>> use ExtUtils::Installed;
>>> my ($inst) = ExtUtils::Installed->new();
>>>
>>> foreach my $module (sort $inst->modules()) {
>>>         printf "%-30s%s\n", $module, $inst->version($module);
>>> }
>>>     
>>
>> ExtUtils::Installed is for regularly installed files (it reads info
>> from .packlist files). For modules which were copied into the library
>> dirs, only traversing @INC will do it right.
>>
>>   
> FWIW, Module::Util installs a script called pm_which:
>
> $ pm_which -Vnm ''
>
> Lists all modules in @INC (by module name), along with their version 
> numbers.
Excellent. That solves my problems exactly. Many thanks.
>
> Matt
>



More information about the london.pm mailing list