in reply to Re: Dynamic "use lib"
in thread Dynamic "use lib"
BEGIN { if ($version =~ /beta/){ eval "use lib('/path/to/dev/modules')"; } else { eval "use lib('/path/to/prod/modules')"; } }
Or, simpler, just manipulate @INC directly since that's what 'use lib' is doing:
BEGIN { if ($version =~ /beta/){ unshift @INC, '/path/to/dev/modules'; } else { unshift @INC, '/path/to/prod/modules'; } }
-sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Dynamic "use lib"
by Anonymous Monk on May 21, 2004 at 18:30 UTC | |
|
Re: Re: Re: Dynamic "use lib"
by dragonchild (Archbishop) on May 21, 2004 at 17:26 UTC | |
by samtregar (Abbot) on May 21, 2004 at 17:33 UTC |