I can think of a number of options, probably none of which you will like a lot, but one of which may be acceptable:

1/ Always use the latest version of the modules regardless of the combination of A and B that you have installed. It is natural for modules to evolve, but they should evolve in a controlled fashion so that later versions of a module do not break earlier scripts. Unit tests can check that that is the case. Just from a maintenance point of view the interface to a module should not change a lot over time because ensuring the correctness of use becomes problematic if it does change.

2/ Name the directory containing the module differently for the two scripts so that the scripts see different versions of the module.

3/ Always use the latest compatible version of the module and include a version number in the module name. Change the module name version number when there is a significant change the the interface. This is somewhat like option 1 with an escape clause for when you need to do a large overhaul of the module interface.


Perl reduces RSI - it saves typing

In reply to Re^4: Cat'ing perl modules into single file script by GrandFather
in thread Cat'ing perl modules into single file script by Smitty

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.