muntfish has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I have a question about how perl builds the @INC array at startup. I've checked perlrun but this hasn't really answered my questions.
I have PERL5LIB set to a list of directories, but I've noticed that perl can "detect" certain "special" subdirectories if they exist. In my case (running 5.8.0 on HP-UX) it will add subdirectories "5.8.0" and "PA-RISC1.1" into @INC if it finds them.
Is there a full list of all these "special" directories? Is there an equivalent to the version-specific directory, for other (older) versions of perl? My problem is that I'm trying to construct an environment where perl 5.8.0 can co-exist with perl 5.004_04, but I can't get the older perl to recognise any version-specific subdirectory (I've tried 5.004_04, 5.00404, 5.4.4 etc).
Update: if at all possible I need to get perl to see the version-specific directories without changing the source by adding "use lib" or -I.
If these special directories are set at compile time, is there any way of looking up what they were set to? perl -V didn't show this (unless I missed something).
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Construction of @INC by different versions of perl
by eserte (Deacon) on Jun 10, 2004 at 09:36 UTC | |
by muntfish (Chaplain) on Jun 10, 2004 at 09:47 UTC | |
by eserte (Deacon) on Jun 10, 2004 at 10:46 UTC | |
by muntfish (Chaplain) on Jun 10, 2004 at 10:51 UTC | |
by eserte (Deacon) on Jun 10, 2004 at 10:59 UTC | |
by blueAdept (Beadle) on Jun 10, 2004 at 14:54 UTC | |
|
Re: Construction of @INC by different versions of perl
by inman (Curate) on Jun 10, 2004 at 12:48 UTC |