Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: installing local modules

by TGI (Parson)
on Jun 28, 2002 at 00:49 UTC ( #177899=note: print w/replies, xml ) Need Help??


in reply to Re: installing local modules
in thread installing local modules

I've found that PREFIX alone is sometimes not enough. HTML::Mason, for example, would not install for me without all the added info. Here's the setup I use when I run perl Makefile.PL:

PREFIX=/home/tgi/usr/local \ INSTALLPRIVLIB=/home/tgi/usr/local/lib/perl5 \ INSTALLSCRIPT=/home/tgi/usr/local/bin \ INSTALLSITELIB=/home/tgi/usr/local/lib/perl5/site_perl \ INSTALLBIN=/usr/home/tgi/usr/local/bin \ INSTALLMAN1DIR=/home/tgi/usr/local/lib/perl5/man \ INSTALLMAN3DIR=/home/tgi/usr/local/lib/perl5/man/man3

I have this saved in a file called popt (for perl options) and I just issue the command perl Makefile.PL `cat ~/popt`. I like to recreate the /usr hierarchy of a traditional perl installation, but that is not necessary.

To add modules to your search path you have a couple of options. You may be able to modify the enviroment on your server through an .htaccess file (if you are on an apache based system). On a mod_perl enabled server, you can use PerlSetEnv PERL5LIB /path/to/private/libraries/. Otherwise you are likely to be stuck adding a use lib qw(/path/to/modules /ya/path/to/modules); to each script.


TGI says moo

Replies are listed 'Best First'.
Re: Re: Re: installing local modules
by donaldm314 (Pilgrim) on Jun 28, 2002 at 04:46 UTC
    I do something similar in scripts that automate module installation. However, I use a longer list of variables:
    $makefile_args =
      " INSTALLPRIVLIB=$prefix/usr/lib/perl5/5.6.0 " .
      " INSTALLARCHLIB=$prefix/usr/lib/perl5/5.6.0/i386-linux " .
      " INSTALLSITELIB=$prefix/usr/lib/perl5/site_perl/5.6.0 " .
      " INSTALLSITEARCH=$prefix/usr/lib/perl5/site_perl/5.6.0/i386-linux " .
      " INSTALLBIN=$prefix/usr/bin " .
      " INSTALLSCRIPT=$prefix/usr/bin " .
      " INSTALLMAN1DIR=$prefix/usr/share/man/man1 " .
      " INSTALLMAN3DIR=$prefix/usr/share/man/man3 ";
    
    
    All I do is set the $prefix. Voila! Modules where we want 'em!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-12-04 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?