installing module to my own directory with MCPAN

installing module to my own directory with MCPAN

Post by ioneab » Mon, 17 Jan 2005 21:50:24


I installed Switch.pm in my own module directory on my web account
using:

perl Makefile.PL PREFIX=/u/mydir/perl

It took a while and was not easy because I had to look through
directories for it with ftp and when I finally got it, decompressed it,
and attempted installation, I was told I needed Filter. I had to go
through the whole process again to install Filter first.

All of this was because I wrote a script on my home computer using
Switch and I thought I would be cool and use Switch instead of if,
elsif, etc...

My question is: Why can't I use:

perl -MCPAN -e 'shell'

with some equivalent of the PREFIX option so it can handle my
installation headaches for me? The problem is that I do not have root
access on this account. I do everything on the command line using ssh
to connect.

Thanks!

wana
 
 
 

installing module to my own directory with MCPAN

Post by A. Sinan U » Mon, 17 Jan 2005 22:35:31


@c13g2000cwb.googlegroups.com:


There is nothing called MCPAN.


You have been around long enough to know that you should read the
documentation for the modules you are using before posting here:

http://www.yqcomputer.com/ ~andk/CPAN-1.76/lib/CPAN.pm#CONFIGURATION

http://www.yqcomputer.com/ ~andk/CPAN-1.76/lib/CPAN.pm#FAQ (specifically,
question 5).

Sinan.

 
 
 

installing module to my own directory with MCPAN

Post by ioneab » Mon, 17 Jan 2005 22:45:07

[...]

Sorry, I really did not know that the interactive shell for downloading
modules was actually CPAN.pm. That is really helpful. Now that I know
what I'm using, I'll read about it. I'm glad that it's not really
MCPAN. It sounds like a McDonald's breakfast. Thanks!

wana
 
 
 

installing module to my own directory with MCPAN

Post by Paul Lall » Mon, 17 Jan 2005 23:30:15


downloading
know

The -M in
perl -MCPAN -e'shell'
is a command line option that loads a module. Saying -MCPAN is the
equivalent of saying
use CPAN;
within a script. Read more about it in
perldoc perlrun

Paul Lalli
 
 
 

installing module to my own directory with MCPAN

Post by ioneab » Wed, 19 Jan 2005 01:55:34


Thanks!

I finally got things working, though it took a little experimentation.
The following may be helpful as it worked for me:

create this path and file:

~/.cpan/CPAN/MyConfig.pm

Then put the following in the file:


$home = $ENV{'HOME'};
$CPAN::Config = {
cpan_home=>$home
};
1;
__END__

then type the usual:

perl -MCPAN -e shell

and answer all of the questions.

Look out for the one about PREFIX= so you can let it know where you
want your modules to go.
The contents of the MyConfig.pm gave me the most trouble.

wana
 
 
 

installing module to my own directory with MCPAN

Post by ChicksHate » Sat, 22 Jan 2005 06:40:57

Thanks for the link here, what you and Paul showed will surely help.

P.S.

Don't you just love , when you are asking for help, You get some JERK
like Sinan, who think he knows it all, and bust yer ,,,, instead of
trying to be NICE and helpful.

Geesh, what a weenie..

Hey, Sin. Instead of being a snotty nosed jerk, Why don't ya chose to
be nice and helpful or put your time into doing something CONSTRUCTIVE
rather than DESTRUCTIVE...

*mumbles "weenie" again*

Gawd, sometimes dontcha just wish you could reach out and TOUCH
someone.....
 
 
 

installing module to my own directory with MCPAN

Post by Helgi Brie » Sat, 22 Jan 2005 21:30:28

On 20 Jan 2005 13:40:57 -0800, "ChicksHateMe"



You are sadly mistaken, troll thing. Sinan is a knowledgable
and *very* helpful denizen of this group.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
 
 

installing module to my own directory with MCPAN

Post by Sherm Pend » Sat, 22 Jan 2005 21:37:13


Nice attitude, *not*. At least I understand the nickname now.

*plonk*

sherm--

--
Cocoa programming in Perl: http://www.yqcomputer.com/
Hire me! My resume: http://www.yqcomputer.com/
 
 
 

installing module to my own directory with MCPAN

Post by anno400 » Sat, 22 Jan 2005 21:37:23

ChicksHateMe < XXXX@XXXXX.COM > wrote in comp.lang.perl.misc:

Sinan (who *is* one of the more knowledgeable people around here) was
helpful enough, pointing you to the FAQ that answers exactly your
question. If you want NICE, invest a minimum of your own effort before
asking. The fact that you failed to notice the module "MCPAN" you are
asking about doesn't even exist clearly shows that you didn't.


Bye.

Anno