Preparation for installing Perl modules
There are a large number of Perl modules available, and only a small proportion of these are included in the package feed for OpenSlug. If the package you want is not in the feed you will probably have to download and install it manually.
Modules are normally made available as gzip compressed "tar" archives with the file extension ".gz"
Modules fall into two categories:
Pure modules usually install without issues, however modules with code require some work before they will install.
Making changes to the perl install to allow modules to be compiled.
xsubpp and typemap:
Here's an example of using wget to fetch the files directly into the folder where they are required.
These are two files that were left out of the openslug perl distribution. It is understandable that they would be left out as they are mainly used for creating perl packages but unfortunately they are needed to install some of the more complex modules. I obtained replacements from my perl 5.8.8 test installation.
The version mismatch between 5.8.7 and 5.8.8 is not a problem but if perl advances to version 5.9 or 6.0 then newer files should be obtained.
Config.pm contains information on the tool chain (the c compiler) used to build perl. Some extensions include C code and the code must be compiled with the same compiler as built the main perl executable. Perl was cross-compiled on a PC, so Config.pm contains a reference to a tool called ccache which is not present on openslug. The purpose of ccache is to speed up compilation so it is not actually required but while it is referenced in Config.pm the package will look for it and fail.
Find Config.pm in /usr/lib/perl5/5.8.7/armeb-linux
Find the line in Config.pm that reads as follows:
Edit out "ccache" so that line reads:
Take care not to alter anything else. Now you've replaced the missing files and fixed the toolchain you can install the module.
Alternatively you could install ccache
If you already tried and failed to install a module you should probably run "make clean" to clear out the failed attempt before rerunning "perl Makefile.PL" etc.
The CPAN shell provides a way to automatically download and install Perl modules. The modules are obtained from the Comprehentive Perl Archive Network and the shell will recursively install any modules that the requested module depends on.
The CPAN shell needs some adjustment before it will work on Openslug.
wget http://ccache.samba.org/ftp/ccache/ccache-2.4.tar.gz tar zxvf http://ccache.samba.org/ftp/ccache/ccache-2.4.tar.gz cd ccache-2.4 ./configure make make install