LA.pm: Hi & ?

Samy Kamkar SKamkar at LucidX.com
Sat Feb 9 16:30:34 CST 2002


You can still use modules that you don't have permissions to install.
All you do is install like normal except don't do a 'make install'. 
Then you keep either the entire directory or just the 'blib/' dir that 
was created inside, and in your programs you do either of the following:

use blib "/entire/path/to/ModuleDir";
# or
use blib "/entire/path/to/blib";
use Module;

For example, if I wanted to use Term::ANSIColor on a machine that didn't 
have it and I don't have root:

$ cd /home/me
$ wget http://www.cpan.org/authors/id/RRA/ANSIColor-1.04.tar.gz
$ tar -zxvf ANSIColor-1.04.tar.gz
$ rm ANSIColor-1.04.tar.gz
$ cd ANSIColor-1.04
$ perl Makefile.PL
$ make
$ mv blib /home/me
 From now on, if I ever want to use Term::ANSIColor, I do the following 
in my perl programs:
use blib "/home/me/blib";
# or just "/home/me" since it will
# check for the blib dir inside
use Term::ANSIColor;
...
I'm sure there's a way when you run Makefile.PL or `make install` to 
have it automagically install into, say, /home/me/modules/ so everytime 
you want to install a module you easily just add an arguement to `make 
install` that will install it in the directory of your choice and in all 
your programs you always stick in a:
use blib "/home/me/modules";

I'll look into that tonight and see what's the easiest way to get this 
done, and if there's no easy way, I'll just have to make an easy way :) 
[unless anyone else on the list already knows a way...? besides changing 
the INSTALL* paths in the Makefile..]

-Samy


James Pitts wrote:

> I have used Hostpro.com for several different mysql /
> perl projects. The problem with this provider (and
> many others) is that they don't allow you to install
> CPAN modules; you are stuck with what they think you
> need.
> 
> Any suggestions out there about a good / cheap 
> "virtual server" hosting service which gives you root?
> 
> - James
> 
> 
>>I am looking for a webHost - any recommendations
>>would be appreciated.
>>
>>Jeanne
>>
>>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
> 
> 
> 


-- 
Samy Kamkar -- (877) 898-1424 -- cp5 at LucidX.com
LucidX.com / cobra.LucidX.com / LA.pm.org / code.LucidX.com




More information about the Losangeles-pm mailing list