ExtUtils::Installed vs pminst vs?

Minty mintywalker at gmail.com
Sun Mar 29 20:24:24 BST 2009


On Sun, Mar 29, 2009 at 7:08 PM, James Laver <james.laver at gmail.com> wrote:
> perl -ne 'next if 1..9; $_ = (split /\s+/,$_)[0]; eval "require $_"; print
> "$_\n" if $@;' modules/02packages.details.txt

Ideally I was looking for something that didn't involve using require
to avoid side effects of modules doing stuff in BEGIN blocks, plus
that doesn't help with local code bases that are independent of cpan.

pminst is basically pretty close to what I want, only:

+ cross platform
+ in a module
+ able to search additional dirs (which I can achieve by pushing onto @INC)

I have the start of such a module, but was hoping someone smarter had
already done it better than I could.

Related/aside: I'm using Module::Build::ModuleInfo to try and extract
the version number.  I'm aware nothing is going to be as accurate as
doing 'require'.  Like pmvers [1] does.  For now tho, I'd rather miss
some version data than be requiring each module.  Forgive the
paranoia.

I have poked into PPI [2] but I couldn't easily do better than
Module::Build::ModuleInfo's two regexp's so quickly gave up.

[1] http://search.cpan.org/dist/pmtools/pmvers
[2] http://search.cpan.org/perldoc?PPI#DESCRIPTION


More information about the london.pm mailing list