Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: use lib $lib_dir not working

by wind (Priest)
on Apr 27, 2011 at 09:59 UTC ( [id://901516]=note: print w/replies, xml ) Need Help??


in reply to use lib $lib_dir not working

The following should work for you:

require lib; use Cwd qw(abs_path); use File::Basename qw(dirname); BEGIN { my $dirname = dirname($0); my $perl = abs_path("$dirname/../lib"); lib->import($perl); }

Here's a related question from earlier this year that will have other solutions: adding library directories relative to $0

Replies are listed 'Best First'.
Re^2: use lib $lib_dir not working
by karelb (Novice) on Apr 27, 2011 at 10:13 UTC
    @wind: Thanks a lot, that works for me.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-28 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found