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.
|