1. Finding Dependancies

    You can use CPAN to make an autobundle of all the modules installed in your original ( current) perl build. Or you can try Module::Dependency from CPAN to get a list of file dependancies. You might also look into CPANPLUS as an option if you're able to build on a machine with internet access. CPANPLUS makes it easy to install modules with many dependancies.

  2. Installing modules to custom directories

    You need to specify all of these on the command like when performing a manual build ( perl Makefile.PL PREFIX=...).Most modules only need a few of these but I've found that some will need different ones so I set them all:

    PREFIX=$PREFIX \ INSTALLPRIVLIB=$PREFIX/lib/perl5 \ INSTALLSCRIPT=$PREFIX/bin \ INSTALLSITELIB=$PREFIX/lib/perl5/site_perl \ INSTALLBIN=$PREFIX/bin \ INSTALLMAN1DIR=$PREFIX/lib/perl5/man \ INSTALLMAN3DIR=$PREFIX/lib/perl5/man/man3
    This is documented in perlmodinstall

    I actually keep that snippet in a shell script, like this:

    #!/bin/sh export PREFIX=$HOME/usr/local echo PREFIX=$HOME/usr/local \ INSTALLPRIVLIB=$PREFIX/lib/perl5 \ INSTALLSCRIPT=$PREFIX/bin \ INSTALLSITELIB=$PREFIX/lib/perl5/site_perl \ INSTALLBIN=$PREFIX/bin \ INSTALLMAN1DIR=$PREFIX/lib/perl5/man \ INSTALLMAN3DIR=$PREFIX/lib/perl5/man/man3
    So that $HOME and $PREFIX will be interpreted and then I do: perl Makefile.PL `localperl.sh`

    Or CPANPLUS will let you setup these variables in its configuration if you decide to go that route.

  3. Moving Modules to another machine

    You should be able to just copy the top level directory to another machine provide the architechures and perl builds are identical or if they are all pure perl modules.

  4. Adding to @INC or Custom Library paths

    You can edit an environment variable called PERL5LIB. Directories added here will automatically be added to @INC in all of your scripts.

    It is documented in perlrun

These are techniques that have worked for me, your mileage may vary.

--
Clayton

In reply to Re: Bundling Several Modules and their dependents by clscott
in thread Bundling Several Modules and their dependents by freddo411

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.