"be consistent" | |
PerlMonks |
Re: problem with INCby broquaint (Abbot) |
on Jan 21, 2004 at 16:18 UTC ( [id://322930]=note: print w/replies, xml ) | Need Help?? |
Because use is evaluated at compile-time you need to
modify @INC before a given use statement is
reached. Handily perl comes with the lib module to
facilitate such @INC munging e.g
Also note that I didn't use the lexical variable $dir as that will be declared at compile-time but won't be initialized until run-time (although you can get around this by using a BEGIN block).
HTH
_________
In Section
Seekers of Perl Wisdom
|
|