Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found