in reply to Re: Construction of @INC by different versions of perl
in thread Construction of @INC by different versions of perl

Thanks, but I should have mentioned that I want to make this work without changing source code. I'll update my original node.

Update: further to the above, I've discovered that "use lib" doesn't work with my old perl installation (5.004_04). Looks like this may be because $Config{version} is not defined, which doesn't sound good to me. Is there a workaround?

s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&;

Replies are listed 'Best First'.
Re^3: Construction of @INC by different versions of perl
by eserte (Deacon) on Jun 10, 2004 at 10:46 UTC
    Nevertheless, look at the lib.pm source code and/or documentation, especially the _get_dirs function.

      Oops, I updated my earlier post before I saw your reply. Yes I did check lib.pm and found that it is using $Config{version} to find the version-specific subdirectory. Unfortunately $Config{version} is not defined in our perl 5.004_04 installation...

      s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&;
        Either perl5.005 or perl5.6.0 was the first perl version which used version-dependent subdirectories. So for older perl versions you would strip the version part. Maybe one of the perldelta pages will give more information on this topic.
Re^3: Construction of @INC by different versions of perl
by blueAdept (Beadle) on Jun 10, 2004 at 14:54 UTC
    I know you said you don't want to modify your source, but to gleen from your statement about 5.0. To be backwards compatible with it, and perfectly compatible with current versions:
    sub BEGIN { push @INC, "/path/to/your/modules"; }