The work is done inside of lib.pm's import method, so you might try:
BEGIN { use Sys::Hostname; require lib; if (hostname() eq 'foo.bar.org') { lib->import('/alternate/libdir'); } else { lib->import('/default/libdir'); } }
The advantage of this over the unshift trick is that you'll get architecture-dependent paths added, as well.
perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'
In reply to Re: Conditional 'use lib'
by Chmrr
in thread Conditional 'use lib'
by bjdean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |