Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Calculations before using lib;

by ikegami (Pope)
on Aug 04, 2014 at 16:10 UTC ( #1096161=note: print w/ replies, xml ) Need Help??


in reply to Re: Calculations before using lib;
in thread Calculations before using lib;

hum... passing undef to lib? Fixed:

use FindBin qw($RealBin); my @extra_libs; BEGIN { if ($RealBin =~ /^(\/.+\/monkeyman\/bin)(\/.+)?/) { push @extra_libs, "$1/lib"; } } use lib @extra_libs; use MonkeyMan;
or
use FindBin qw($RealBin); use lib (); BEGIN { if ($RealBin =~ /^(\/.+\/monkeyman\/bin)(\/.+)?/) { import->lib("$1/lib"); } } use MonkeyMan;

Note the switch to $RealBin in order to handle symlinks.


Comment on Re^2: Calculations before using lib;
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1096161]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2015-07-31 05:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls