cpanm --installdeps .
To install all perl module dependencies for a perl application we’re running, when trying to deploy the same app on other servers the application doesn’t work, even though I’m using the same version of perl and following the same steps for installing perl modules. (sigh)
I’m suspecting there could be some problem with newer versions of perl modules ’cause the perl code itself is rsync’ed from the working server .
Here’s how you could create an autobundle package in perl, and use cpan to install the same modules in an other environment / server .
# on the working server: perl -MCPAN -eautobundle Wrote bundle file /path/to/cpan/.cpan/Bundle/Snapshot_2012_10_04_01.pm
Now copy the […].cpan/Bundle/Snapshot_2012_10_04_01.pm to the new server / instance, put it in […].cpan/Bundle/ and issue
perl -MCPAN -e 'install Bundle::Snapshot_2012_10_04_01'
Notice: leaving out the .pm file extension when referring to the Snapshot .
Oh, and by the way
How do I list all installed perl modules ? :
That’s not really intuitive when you’re not a perl programmer, I’ve always started up cpan in interactive mode, haven’t figured out that one before.
perldoc -q installed
While you’re at it, it mentions cpan -a as well, which makes that Snapshot file .
Thank you gugod.org