in reply to Re^3: Using Cartons to automate module installs
in thread Using Cartons to automate module installs
So, yay, that I'm getting results, but I don't quite understand the line of code I'm using to get them. Can you "talk through" what happens on this line, in particular, how the %s's get populated?scandeps.pl -R *.pl | perl -ne 'printf qq{requires "%s", "%s";\n}, eva +l'
Sure:
'Module::Name' => 'version', 'Module::Other' => 'version', ...
It seems to me that it invites disaster to compose a cpanfile by hand, never mind the tedium.
Personally, I don't think so - note that the output of scandeps.pl can sometimes be a lot more verbose than it needs to be. I think it's better to get an understanding of what the module dependency tree looks like instead of blindly relying on the tool - I usually try to keep track of which CPAN dependencies I add to my scripts, and I only use scandeps.pl to get hints whether I may have missed something. Note that in the output you showed, all the the ExtUtils::MM_* modules can probably be omitted, and also ExtUtils::MakeMaker and File::Temp are core modules, meaning that unless your script requires a certain new version of them, they usually don't need to be listed.
|
|---|