Hi All, I would like to have cpan modules installed into multiple
directories on a single computer, as shown in the following
Is there an elegent way to do this?
- /usr/local/lib - Only perl base modules
- /app/common/cpan - Common but not core base modules (EG.
- /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)
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. ;-)
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||