in reply to How to combine multiple perl modules to make them run from command line
Now, let's say you want to install all the dependencies. Cool, but the major dependencies are mostly core and/or dual-lived. You can't install or upgrade core dependencies without reinstalling perl, so you'll need to scratch the core modules off your list. The dual-lived modules can be upgraded, so leave them on the list. Add to that list any noncore dependencies that are there, and the script is done.#!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install('CGI');
How do you find the dependencies? An easy way is to use CPAN::FindDependencies. Download it, then run this script to get a record:
You can also run cpandeps CGI from the command line.#!/usr/bin/perl use strict; use warnings; use CPAN; open STDOUT, '>', '/root/Desktop/CGIdeps'; system("cpandeps CGI"); close STDOUT;
Next, to determine which modules are core, you want to use Module::CoreList. From the command line, do corelist CGI. It'll tell you that it's core.
Is CGI core only or dual-lived? Use App::DualLivedList. From the command line, do dual-lived CGI. It'll tell you if it's dual-lived.
The finished script should look something like this:
#!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install( "FCGI", "Scalar::Util", "File::Spec", "Test::Harness", "Test::More", "CGI");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to combine multiple perl modules to make them run from command line
by DrHyde (Prior) on Nov 11, 2010 at 11:09 UTC |