[plug] Dynamic Perl Library Pathing...

Matthew Robinson matt at zensunni.org
Mon Oct 14 15:27:04 WST 2002


> 
> How about:
> 
> #!/usr/bin/perl
> 
> BEGIN {
>    $0 =~ s#^(.*)/##;
>    push @INC, $1;
> }
> 
> use CustomLibrary;
> 
> 
> Matt

On the other hand the following is even neater:

#!/usr/bin/perl

use FindBin qw/$Bin/;
use lib $Bin;


use CustomLibrary;

...

__END__


HTH

Matt

-- 
print map{s&^(.)&\U\1&&&$_}split$,=$",(`$^Xdoc$,-qj`=~m&"(.*)"&)[0].$/



More information about the plug mailing list