Skip to content

Instantly share code, notes, and snippets.

@igal
Created June 24, 2009 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igal/135351 to your computer and use it in GitHub Desktop.
Save igal/135351 to your computer and use it in GitHub Desktop.
Is the ExtUtils::Installed in Perl 5.10 broken?
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?
# From shell, install a silly package:
cpan Acme::please
# From Perl, get the lists of file in this package:
use Acme::please; # Silly way to check that package is installed
use Data::Dumper;
require ExtUtils::Installed;
$packlists = ExtUtils::Installed->new;
p Dumper([$packlists->files('Acme::please')]);
# Perl 5.8 returns an array:
$VAR1 = [
'/usr/local/man/man3/Acme::please.3pm',
'/usr/local/share/perl/5.8.8/Acme/please.pm'
];
# Perl 5.10 raises an exception at the `$packlists->files` call:
Acme::please is not installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment