in reply to Re: Packaging Libraries before deploying my Scripts.
in thread Packaging Libraries before deploying my Scripts.

I want to clarify something here... '/wherever/you/want/' is the same as my <path_to_lib> and not any subdirectories in it..

Regarding the secong point you mentioned, even I thought the same, I think I would create a simple bash script which will do the installation of these libraries. I will pack the tar files in the project directories as of now.

and thanks, I will add a README.

Appreciate the help..
  • Comment on Re^2: Packaging Libraries before deploying my Scripts.

Replies are listed 'Best First'.
Re^3: Packaging Libraries before deploying my Scripts.
by marto (Cardinal) on Oct 25, 2016 at 13:53 UTC

    It's perhaps worth pointing out that some modules are wrappers around external libraries, e.g. XML::LibXML is an interface on libxml2. You'd need to ensure that the required libraries and so on are available on the target machines. An alternative idea worth considering would be packaging your scripts and their dependencies into an executable using something like PAR/pp, e.g. on my 64bit Debian system:

    #!/usr/bin/perl use strict; use warnings; use XML::LibXML; use Spreadsheet::ParseExcel; print "test\n";

    Packaged to an executable Packaged via:

    pp -x -o Packaged \ -l /usr/lib/x86_64-linux-gnu/libicudata.so \ -l /usr/lib/x86_64-linux-gnu/libxml2.so \ -l /usr/lib/x86_64-linux-gnu/libicuuc.so \ source.pl
Re^3: Packaging Libraries before deploying my Scripts.
by 1nickt (Canon) on Oct 25, 2016 at 12:43 UTC

    Yep. If you have some libs you made like:

    /home/fred/perl/lib/ModuleName.pm /home/fred/perl/lib/ModuleName/Extend.pm /home/fred/perl/lib/OtherModule.pm
    You only need to say:
    use lib '/home/fred/perl/lib'; use ModuleName::Extend; use OtherModule;

    The way forward always starts with a minimal test.