Compiling a portable Perl and including a CPAN module
I am trying to compile a portable version of perl containing a CPAN module, specifically the YAML module. I intend to be able copy this portable version into my home directory on numerous Redhat Linux machines, add it to my $PATH and use this version instead of the default perl version to run some tests.
I have already managed to compile a portable version of perl and got it working on different machines. However, when I compile the YAML module and install it, it works locally but then fails when I copy it to other machines.
Here's my compilation steps locally for the YAML module
开发者_运维技巧perl Makefile.pl
make test
make install
Which installs the YAML module locally and also works locally when I use the YAML module in a script.
This is the error once I copy perl to another machine and try to use the YAML module...
Can't locate loadable object for module YAML::XS::LibYAML in @INC
even though lib/site_perl/5.10.1/x86_64-linux/YAML/LibYAML.pm exists in my local copy.
Is what I'm attempting to do possible?
If so, where am I going wrong?Possibly you should explore PAR with which you can create an archive of your module dependencies and ship it alongside your application.
精彩评论