One liner for perl dependenciesPosted on December 18, 2012
If your module is FooBar, and you are using cpanminus then
cpanm perl -MFooBar -e 'print join("\n", keys %INC),"\n"'
will install all the dependencies needed for that module.
This however will not work if you do not have the modules installed to run the script in the first place, but if you install the Devel::Modlist package it is as simple as
cpanm `perl -MDevel::Modlist=stdout,noversion FooBar.pl`