I'm acutally in a similar boat with a project that I'm working on. Here's some things that can help.

1) if you're using ye-olde "perl Makefile.pl" method of installing your system, or you *can* use this method; add options to your WriteMakeFile configuration that look like this:

INSTALLSITELIB => '/opt/bamf/lib', INSTALLSCRIPT => '/opt/bamf/bin', EXE_FILES => ['relative/path/to/pl1','relative/path/to/pl2]

The first line (I think) will override the default location for the installation of the pm's. The second spells out where the executable scripts go, the third lists the executables to be installed. The handy thing that this process also does is that it fixes the #!/perl/lives/here lines in those scripts to match the location of the perl that executed the Makefile.PL.

2) You could use CPAN to install / update each system to the latest version of the required modules at the time you run 'perl Makefile.pl'...this of course assumes that CPAN is configured on each of these systems.

3) If it's a rule that your application's layout has 'bin' and 'lib' as siblings of the same directory, you can use File::Spec to figure out where lib is at run time or within a BEGIN block.

use File::Spec; my $lib_path = File::Spec->rel2abs($0); $lib_path =~ s/\/bin\/[\w\d-]+\.pl/lib/; push(@INC,$lib_path);

Another nice thing about using the Makefile.pl approach is that it will run your test suite before it performs an upgrade of your application. This way if some new feature doesn't work on machine X, you didn't trample an old (but working!) installation.

edit fixed typos.

/\/\averick


In reply to Re: Deployment Qs by maverick
in thread Deployment Qs by ph713

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.