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 CPAN shell directly to download content, or installing cpanminus. Changing the access policy is beyond my control, so I am looking for a workaround. I also don't have root access to this Linux server.
I can, however, download anything to my work's Window machine, and upload to a file share on this server. So I started to pull down the DateTime dependencies one by one. I would download a module, sometime it will have Makefile.PL, sometime it will have Build.PL. I then rebase each Build or Makefile to my INSTALL_BASE, test each module. I did that for about 20 modules, and the trees seem to expand to ever smaller classes with no end in sight...
I hope you can tell me a better way. Is there a way I can initiate a download from a machine with CPAN access (ie. my Windows box) of all the DateTime dependencies into one giant Perl package, upload it to the Linux server, and run CPAN there (without network access) to put things in the right place? Thanks.
To install Perl modules using CPAN, you need to use the cpan command-line utility. You can either run cpan with arguments from the command-line interface, for example, to install a module (e.g Geo::IP) use the -i flag as shown.
CPAN.pm, CPANPLUS, and cpanminusAn interactive shell called cpan is also provided in the Perl core, and is the usual way of running CPAN.pm. After a short configuration process and mirror selection, it uses tools available on the user's computer to automatically download, unpack, compile, test, and install modules.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With