[Pdx-pm] Is the ExtUtils::Installed in Perl 5.10 broken?

Igal Koshevoy igal at pragmaticraft.com
Wed Jun 24 10:57:09 PDT 2009


Erik Hollensbe wrote:
> On Wed, 2009-06-24 at 09:09 -0700, Igal Koshevoy wrote:
>   
>> I need to be able to query an installed CPAN package and find out what
>> files it contains. I had code that worked fine with Perl 5.8, but it
>> doesn't work with 5.10. Any ideas? Is there another way that I should be
>> doing this?
>>     
>
> I know this doesn't answer your question, but is there some reason you
> can't use the old fashioned idiom:
>
> perl -MAcme::please -e1 
>
> and check $?
>
> You could even write a module to do it. :)
My goal is to get a list of files that are part of that module.

Here's an example of how weird the situation is:

    use Data::Dumper;
    require CPAN;
    require ExtUtils::Installed;
    $module = "Acme::please";
    require CPAN;
    print Dumper($CPAN::META->has_inst($module));
    $packlists = ExtUtils::Installed->new;
    print Dumper($packlists->files($module));

The `$CPAN::META->has_inst` tells me that the package is installed. The
`$packlists->files` tells me it's not. :/

-igal


More information about the Pdx-pm-list mailing list