Hello Monks,

I seek your wisdom one more time to package scripts in such a way that there is no conflict with existing Perl applications.

Here is the scenario. I developed some scripts using Activestate Perl 5.8.9.825 for Windows and Linux platform. My scripts are dependent on modules like Date::Formatter, Config::IniFiles etc.

I manually installed these modules on my first target machine (Windows 2003 server). I did not realize that Oracle was also installed on the same machine, which also uses some older versions of Perl scripts. My scripts did not work right out of the box. I had to set the environment variable PERL5LIB to c:\perl\lib in every command session where I ran my scripts. I did not want to make this change permanent, I could broken existing Oracle installation.

So here are my questions:

1. Can I somehow package all the dependent modules along with my scripts so that they get installed in my application folder, rather than under perl/lib?
2. Would you call it a good practice?
3. Do I even need to tinker with PERL5LIB variable?

Please do suggest anything which you consider as a good practice for deploymnt. I am sure my way was kludgy.

Thank you so much in advance.

Ash


In reply to Question: Best practices for packaging scripts by jujiro_eb

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.