Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re[0]: Multiple Library Includes

by Intrepid (Deacon)
on Jun 30, 2004 at 17:27 UTC ( #370821=note: print w/replies, xml ) Need Help??

in reply to Multiple Library Includes

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. ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://370821]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2020-07-03 13:30 GMT
Find Nodes?
    Voting Booth?

    No recent polls found