I'm looking to run a Perl script that has several CPAN module dependencies, and I'm curious if anyone has had success getting CPAN to work on the Linono distro without doing a custom image build. I tried to copy the modules to the script's lib directory, but I need to add Perl::Strict which is giving me dependency issues. For the record, here are the libraries I am using:
Maybe this cannot work, as some perl modules come with C code, which gets compiled during the module installation. And I think there is no C compiler on the arduino yun.
Anyway, are "simple" perl scripts are running? What did you do? Where did you downloaded the perl prog from?
My Arduino Yun came with perl v5.10.0 installed, but there are no external perl modules installed. The default @INC perl module directory is /usr/lib/perl5/5.10.0 (which didn't exist).
strict.pm is an all perl module, so it is an easy one to install. Just copy the strict.pm file from CPAN to /usr/lib/perl5/5.10.0/strict.pm
You can verify that strict works by running this perl one liner:
perl -e 'use strict;$test=1;'
The results should be similar to this:
Global symbol "$test" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
FYI the "strict" library is used to ensure you don't violate basic coding rules. Stripping out the "use strict;" lines from modules that are using it will be fine.
To build and install modules without using the CPAN module (etc.) just download the module...
tar -xzvf FooModule.tar.gz
cd FooModule
perl Makefile.PL
make
make test
make install
The three modules you have listed do not have any binary parts to them so installation should work. Or, in the event that the above commands fail, you can move the .pm files by hand into the appropriate @INC directory. Using the example of JulianDate the best place would be: