Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
zakzebrowski:
Hi All, I would like to have cpan modules installed into multiple directories on a single computer, as shown in the following example:

  1. /usr/local/lib - Only perl base modules
  2. /app/common/cpan - Common but not core base modules (EG. DBI,Date::Manip)
  3. /app/subapp/cpan - Not common cpan libraries (EG. If I was a supermarket store, I may include for a specific sub application a bar code module if the code I wrote involved inventory etc, and a different department (say finance) would include various accountine modules)
Is there an elegent way to do this?

Yep ... compile perl yourself, with these as your build-time config params. You asked for elegant. This is the only elegant way. All other ways that might be devised are only express trains on the bad line headed straight for Kludgeville.

In particular, the vendor* dirs seem correctly suited to this notion you have of placing modules belonging to specific applications in a separate directory hierarchy of their own.

Related sufficiently to this question that I dare mention it, I've got a tool that I wrote for people with issues like this in mind: showPerlDirConfig. This will show you what your currently-running perl knows internally as its Config dirs. Looking at the output for a just a minute is likely to bring about better understanding for you than quite lengthy attempts at verbal explanations would accomplish.

After running that utility of mine, reading the POD-format file INSTALL that is found in the toplevel of every Perl source kit (every release), would give you some insights, I think.

    Soren A / somian / perlspinr / Intrepid

-- 
Now, 2004: The 3 least meaningful terms in online jargon are:
troll flame rant
These used to mean something; but then they were highjacked by the kind of inferior intellects who, when faced with a more erudite opponent employing superior arguments (or simply hanging in there stolidly with a disagreeable contention), abuse these terms -- merely another form of low-life name-calling. ;-)

In reply to Re[0]: Multiple Library Includes by Intrepid
in thread Multiple Library Includes by zakzebrowski

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, 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, 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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (4)
    As of 2020-07-07 05:51 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?