Sarevok
Sarevok

Reputation: 437

Installing Perl module without CPAN

I'm writing a Perl script that does date operations that need to take holidays into account, so I think I need either Date::Manip or Date::Calc. The server I'm going to put this script on is behind a firewall and therefore CPAN can't connect to the internet. Generally I can install Perl modules by just putting the .pm files in the Perl lib folder, but these two modules both have a C++ component or depend on a non-core module (YALM::Syck for Date::Manip) with a C++ component.

The server I'm deploying to also doesn't have GCC, so copying the installation package and building it there didn't work since it couldn't compile the C++. I tried building the packages on my home Linux PC and then copying them to the server, but got an error saying the module file was incorrect. The server is an IBM AIX box, so the module I compiled for my home pc is probably incompatible.

Is there any way I can get Date::Manip or Date::Calc working on this server? Are there any pure Perl (including dependencies) modules I could use instead?

Upvotes: 2

Views: 1706

Answers (2)

daxim
daxim

Reputation: 39158

All the favourites are not pure-perl.


Set up a development box and mirror the production server. Install the compiler in the development environment. Build the modules and package them for deployment on production (AIX has packages, right‽).

Upvotes: 5

Zefram
Zefram

Reputation: 41

You seriously need a proper toolchain for your server, including a compiler. It's fine to build the CPAN module on another machine and copy the installed files across, but obviously the build environment has to have the same architecture, same OS, and same perl version as the operational server.

Upvotes: 4

Related Questions