I am trying to install the DateTime machine on a Linux server. Unfortunately, this Linux server has some restricted network access policy that prevents me from using the CP
There are some solutions for this problem, see for example Carton which is like ruby's bundler or else Pinto which aims to be your own private CPAN (as I understand it).
The most efficient way by far is to make a minicpan, install cpanm on the linux machine and alias localcpanm
something like this:
alias localcpanm='cpanm --mirror file:///Users/Shared/cpan/ --mirror-only'
I have used this technique on long train journeys with patchy network access with great success.
The first step is to automatically download all of the dependencies. You can use cpanm
to do this on your network connected machine:
cpanm -L /dev/null --save-dists dists --scandeps DateTime
This generates both a list of dependencies, but more importantly downloads them into the dists
directory. The -L /dev/null
ensures that it doesn't pay attention to the modules already installed.
Copy dists
as is to your restricted box.
Then, use cpanm
on your restricted box to perform the local installation:
cpanm --mirror file:///path/to/dists -L foo DateTime
where /path/to/dists
is the absolute path to the dists
directory. This will install things into the foo
directory.
One solution I use at work is to have a development server with perlbrew, one Perl + modules and the app per app and all this in a git repo. On the production machines access to the git repository is all that's needed to deploy the app and switch between versions using tags.