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

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?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2021-10-22 10:22 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.