CPAN 'shell' interface stopped working?

D

Dave Hammond

Don't you hate when this happens? You search Usenet for the answer to
a Perl problem; find that the solution requires installing a new
module; go to crank up the CPAN shell, and ... nothing!

lxrnd1:~/.cpan # perl -mCPAN -eshell
lxrnd1:~/.cpan #

I know I can install the module manually, but it's just so much nicer
being able to have CPAN do the work!

Any ideas what made CPAN all of a sudden decide to take a holiday?

Thanks for any insight.

-Dave H.
 
P

Paul Lalli

Dave said:
go to crank up the CPAN shell, and ... nothing!

lxrnd1:~/.cpan # perl -mCPAN -eshell
lxrnd1:~/.cpan #

Any ideas what made CPAN all of a sudden decide to take a holiday?

CPAN did exactly what you told it to. You didn't tell it to do the
right thing. :)

See:
perldoc perlrun

for a description of the differences betwen the -M and -m flags.

Paul Lalli
 
D

Dave Hammond

Christian said:
That would be expected behaviour. As "perldoc perlrun"
explains, there's a difference between -mMODULE and -MMODULE,
the first one use()ing the module with an empty export
list (thus shell() doesn't get importet as a sub and Perl
treats it as a string in your case).

perl -MCPAN -e "shell"
should still work fine.

Oops! Thanks, guys!! Funny, I must have typed that line a thousand
times in the past 10 years, and I can't recall ever typing "-m" instead
of "-M". Maybe I should just

alias cpan='perl -MCPAN -e "shell"'

:)

Thanks again,
-Dave H.
 
D

David Squire

Dave said:
Christian Winter wrote:

Oops! Thanks, guys!! Funny, I must have typed that line a thousand
times in the past 10 years, and I can't recall ever typing "-m" instead
of "-M". Maybe I should just

alias cpan='perl -MCPAN -e "shell"'

.... why not try typing 'cpan'? It's almost certainly already there :)


DS
 
D

Dave Hammond

David said:
Dave Hammond wrote:

... why not try typing 'cpan'? It's almost certainly already there :)


DS

True enough! Man, think of all the keystrokes I've wasted over the
years!!

-Dave H.
 
B

brian d foy

alias cpan='perl -MCPAN -e "shell"'

... why not try typing 'cpan'? It's almost certainly already there :)[/QUOTE]

Furthermore, if you want to install modules, just tell 'cpan' on the
command line:

% cpan Module::Name Some::Other::Module ...
 
D

Dave Hammond

Christian said:
Which is also documented in "perldoc cpan" :)

-Chris

Documentation? We don't need no steenkin' ... :)

Anyway, I guess I'm just a creature of habit; I learned how to use CPAN
in a particular way, and it worked that way for a decade. The one time
it didn't, I assumed the program was at fault, not my aging memory!
And, yes, I know what they say about assumptions!!

-Dave H.
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top