$ perl -le " use lib do { my @She = qw[ wah diddy diddy dum diddy do ] +; $She[ rand @She ]; }; print for @INC " diddy C:/perl/site/5.12.2/lib/MSWin32-x86-multi-thread C:/perl/site/5.12.2/lib C:/perl/5.12.2/lib/MSWin32-x86-multi-thread C:/perl/5.12.2/lib .
use File::Spec; use File::Basename qw' dirname '; BEGIN { my $thisf = File::Spec->rel2abs(__FILE__); my $thisd = dirname($thisf); use lib File::Spec->catfile( $thisd, File::Spec->updir, 'lib' ); }
use Path::Class; BEGIN { my $thisf = file(__FILE__)->absolute; my $thisd = $thisf->dir; use lib dir( $thisd, '..','lib' ); }
use Path::Class; use lib dir( __FILE__, '..','..','lib')->absolute->resolve;
In reply to Re: use lib $lib_dir not working
by Anonymous Monk
in thread use lib $lib_dir not working
by karelb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |