Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Load module from local dir

by Haarg (Curate)
on Sep 25, 2018 at 11:50 UTC ( #1222962=note: print w/replies, xml ) Need Help??


in reply to Load module from local dir

local::lib has special support for ~ paths. If you want to use the same paths with lib, you'll want to use $ENV{HOME}.

Also, while the "base" directory used by local::lib is ~/perl5, that isn't the include path for libraries. It includes other directories like bin and man. The actual library path is in the lib/perl5 subdirectory. These paths are not entirely determined by local::lib itself, but also based on options given to ExtUtils::MakeMaker and Module::Build.
use lib $ENV{HOME}.'/perl5/lib/perl5';

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2020-09-21 20:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (127 votes). Check out past polls.

    Notices?