Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: My Favorite Module: CPAN

by talexb (Canon)
on Jan 02, 2002 at 03:33 UTC ( #135572=note: print w/replies, xml ) Need Help??


in reply to My Favorite Module: CPAN
in thread New Module Area?

Aighearach wrote (in part), in The Module of Modules: CPAN:

When you find something that sounds way-super-cool, concentrate on:

install package::name
For example, you might want to install Lingua::EN::Gender. This will download the tarball, configure it, make it, make test and make install it for you, saving you the trouble. Why should a Perl hacker have to wrestle with gcc? I say, let's leave the C coding to St. Wall, and his Disciples.

When you first run it, it will ask you some congif questions; I recommend asking the Gods to install any dependencies for you; I have found them to be better at knowing these things than I am.

It might help to run this as root.

This last comment perplexes me a little. When 'might' it help run this as root?

My experience has included piles of Perl development but very little module installation. In the last few months I've been trying my hand at this on the Linux boxes I use as webmaster/developer, but I keep running into privilege violations, and I'm not really sure why. It's a little frustrating, and I hope this post isn't going to increase my 'goof!' rating on PM.

What I'd like to do is create a personal library of stuff from CPAN that my web provider has not yet installed (this is on a Linux box). I would then do a use lib in my code to remind Perl where that module is.

I assume that when I try to install stuff from CPAN (using the CPAN module), it thinks I'm running as root, hence the privilege violations. What do I have to do to get the CPAN installation process to understand that I don't want to alter the system-wide Perl installation, I just want to affect my installation (that is, just my directories)? The answer so far has eluded me.

Any guidance would be most appreciate. Thanks.

--t. alex

"Excellent. Release the hounds." -- Monty Burns.

Replies are listed 'Best First'.
Re (tilly) 2: My Favorite Module: CPAN
by tilly (Archbishop) on Jan 06, 2002 at 22:08 UTC
    Try creating a file ~/.cpan/CPAN/MyConfig.pm that overrides likely-looking values in CPAN::Config. (eg where you build stuff, where you install it, etc). That should let you use CPAN to install anything you want into a directory tree of your choice. You can then use lib as you do now.
Re: Re: My Favorite Module: CPAN
by Aighearach on Jan 02, 2002 at 20:35 UTC
    The installation location is determined by the settings built into your perl at compile time. The working directory is set in CPAN::Config.pm. Generally to use the CPAN module for user module installation, you'll want to install your own perl. Usually this is done with the binaries in ~/bin and the libs in ~/lib/perl5.
    --
    Snazzy tagline here

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2019-12-06 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (156 votes). Check out past polls.

    Notices?