in reply to Perl Module Dependencies

If you already have the list of modules, what about the brute-force approach of just trying to load them? If the load fails, it's likely to be a dependency failure -- and you can parse the failure message to confirm it.

for my $mod ( @modules ) { eval "require $mod" or print "$mod failed\n"; }

That won't necessarily detect run-time dependencies, but that's tricky anyway.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Replies are listed 'Best First'.
Re^2: Perl Module Dependencies
by dimishome (Beadle) on Nov 10, 2006 at 16:49 UTC
    If any one cares, I found a module that will almost do everything I need (Module::ScanDeps).