installing module to my own directory with MCPAN

I

ioneabu

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
 
A

A. Sinan Unur

(e-mail address removed) wrote in @c13g2000cwb.googlegroups.com:
Subject: installing module to my own directory with MCPAN

There is nothing called MCPAN.
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?

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

http://search.cpan.org/~andk/CPAN-1.76/lib/CPAN.pm#CONFIGURATION

http://search.cpan.org/~andk/CPAN-1.76/lib/CPAN.pm#FAQ (specifically,
question 5).

Sinan.
 
I

ioneabu

[...]
There is nothing called MCPAN.

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
 
P

Paul Lalli

[...]
There is nothing called MCPAN.

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!

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
 
I

ioneabu

Paul said:
[...]
There is nothing called MCPAN.

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!

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


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
 
C

ChicksHateMe

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.....
 
H

Helgi Briem

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...

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

--
Helgi Briem hbriem AT simnet DOT is

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?
 
S

Sherm Pendley

ChicksHateMe said:
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.

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

*plonk*

sherm--
 
A

Anno Siegel

ChicksHateMe said:
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.

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.
Geesh, what a weenie..

Bye.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top