Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Building Perl With My Own Module Directories

by williams (Beadle)
on Oct 07, 2005 at 18:16 UTC ( [id://498283]=perlquestion: print w/replies, xml ) Need Help??

williams has asked for the wisdom of the Perl Monks concerning the following question:

While building Perl, configure asks me to provide any directories I want added to the default @INC where I can keep my own modules. I have three areas I'd like added this way, but am unsure which directories to specify for each. Specifically, in addition to /my/module/dir, are there any combinations of site_lib, vendor_lib, $archname, Perl version, auto, etc. that I need to add so that one area works with MakeMaker, use, require, DynaLoader, etc., without having to resort to use lib?

Thanks,

Jim Williams

Replies are listed 'Best First'.
Re: Building Perl With My Own Module Directories
by ioannis (Abbot) on Oct 07, 2005 at 18:57 UTC
    One easy way to add paths to @INC is to use a loser or system-wide environ variables (say, via /etc/profile) PERL5LIB or PERLLIB. They are a collon-separated list of pathnames; consult 'perldoc perlrun' for more details.
      I'm familiar with $PERL5LIB, etc. but don't have the permissions needed to influence user environments to make that work. That's why I'm trying to use the configure hooks instead.

      Thanks anyway,

      Jim Williams

Re: Building Perl With My Own Module Directories
by mda2 (Hermit) on Oct 07, 2005 at 20:41 UTC
    If I understood your needs the "use lib ..." solve your question...

    perl Makefile.PL LIB=libdir (or Build.PL TARGET=...) ... in your script: use lib qw( libdir );

    --
    Marco Antonio
    Rio-PM

Re: Building Perl With My Own Module Directories
by ides (Deacon) on Oct 08, 2005 at 16:34 UTC

    Maybe I'm misunderstanding your question, but I believe the answer is you don't need to.

    Adding directories for @INC when building Perl does add them in defaultly for the system, but you don't need to concern yourself with site_lib, vendor_lib, etc, etc, etc. The build process takes care of all of that for you.

    All you should need to do is add the various directories you want ADDED to the typical system wide @INC.

    Hope this helps...

    Frank Wiles <frank@wiles.org>
    http://www.wiles.org

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://498283]
Approved by ikegami
Front-paged by holli
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (8)
As of 2024-04-16 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found