John Alvord, IBM Corporation
Draft #4 – 5 January 2015 – Level 2.00000
The Sitworld blog posts include a number of Perl projects. Some of them use Comprehensive Perl Archive Network or CPAN packages.
If you are implementing a project on your own workstation adding the packages is a best practice.
However if you are implementing on a shared production system, that might be difficult or impossible. If you do not have internet access or are less experienced with Perl the challenges can be severe. To manage this issue this post has a zip file which contains a directory which with needed CPAN packages. See the History section following the summary if you need earlier levels. These are only several of almost 25,000 useful packages.
A Perl invocation parameter causes that directory to be searched before the system libraries. For most Sitworld projects that will run ok without changing the system installed Perl libraries.
There are two libraries. Version 1.0000 is for Perl 5.16 and version 2.00000 is for Perl 5.20. The main difference in 5.20 is absence of SOAP::Lite. The Perl 5.20 enabled packages now use LWP::UserAgent. That is needed for some future multi-threading requirements.
This pre-system library does not work if a CPAN package contains C source code. In that case it must be compiled and such a package cannot be delivered this way. Right now the limitation applies only to the Situation Audit project.
The zip files are 5.20 and 5.16. It contains two sets of files.
1) Windows – a directory named “inc”
2) Linux/Unix – a file named unix-cpan-inc.tar
For Windows you simply copy the directory somewhere convenient for the project.
For Linux/Unix you transfer it [in binary!!] to the system where it will be used. Then un-tar it
tar -xf unix-cpan-inc.tar
That process will create a directory “inc”.
The following is added to the program invocation before the Perl program name “-Iinc”. For example for Agent Health survey it would look like this
perl -Iinc itm_tems_health.pl <rest of parms>
Note: Just following the first dash is a capitol i and not a lower case L.
This CPAN library for Sitworld packages was developed for Agent Health Survey and is now used for other projects.
Sitworld: Table of Contents
History and Earlier versions
CPAN packages – if latest does not work try an earlier version and please give feedback.
Perl 5.20, remove unneeded lwp/protocol/https.pm
Perl 5.20 project CPAN library
Perl 5.16 project CPAN Libary
Photo Note: A Flutter of Robins – Spring 2011
2 thoughts on “Sitworld: CPAN Library for Perl Projects”