There's more than one way to do things | |
PerlMonks |
Re^2: Conditional 'use lib'by Anonymous Monk |
on Dec 04, 2007 at 18:48 UTC ( [id://654908]=note: print w/replies, xml ) | Need Help?? |
Just found an even easier way, which seems to work for me:
my $module = "ROX::Filer";
eval "use $module";
die "couldn't load $module : $!n" if ($@);
See http://weierophinney.net/matthew/archives/23-conditional-use-in-perl.html
In Section
Seekers of Perl Wisdom
|
|