zakzebrowski has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I would like to have cpan modules installed into multiple directories on a single computer, as shown in the following example:
Is there an elegent way to do this? I know that for a single custom directory (eg. /app/common/cpan ), I could do something like: perl Makefile.PL PREFIX=/app/common/cpan LIB=/app/common/cpan , and then just use lib '/app/common/cpan' in my applications, but I tried doing a perl Makefile.PL PREFIX=/app/subapp/cpan:/app/common/cpan but that didn't work. Any ideas, or am I making this too hard on myself?
THANKS.
- /usr/local/lib - Only perl base modules
- /app/common/cpan - Common but not core base modules (EG. DBI,Date::Manip)
- /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? I know that for a single custom directory (eg. /app/common/cpan ), I could do something like: perl Makefile.PL PREFIX=/app/common/cpan LIB=/app/common/cpan , and then just use lib '/app/common/cpan' in my applications, but I tried doing a perl Makefile.PL PREFIX=/app/subapp/cpan:/app/common/cpan but that didn't work. Any ideas, or am I making this too hard on myself?
THANKS.
Back to
Seekers of Perl Wisdom