CPAN 'shell' interface stopped working?

Discussion in 'Perl Misc' started by Dave Hammond, Sep 7, 2006.

  1. Dave Hammond

    Dave Hammond Guest

    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.
     
    Dave Hammond, Sep 7, 2006
    #1
    1. Advertising

  2. Dave Hammond

    Paul Lalli Guest

    Dave Hammond wrote:
    > 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
     
    Paul Lalli, Sep 7, 2006
    #2
    1. Advertising

  3. Dave Hammond

    Dave Hammond Guest

    Christian Winter wrote:
    > Dave Hammond wrote:
    > >
    > > lxrnd1:~/.cpan # perl -mCPAN -eshell
    > > lxrnd1:~/.cpan #

    >
    > 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.
     
    Dave Hammond, Sep 7, 2006
    #3
  4. Dave Hammond

    David Squire Guest

    Dave Hammond wrote:
    > Christian Winter wrote:


    >> 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"'


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


    DS
     
    David Squire, Sep 7, 2006
    #4
  5. Dave Hammond

    Dave Hammond Guest

    David Squire wrote:
    > Dave Hammond wrote:


    > > Maybe I should just
    > >
    > > alias cpan='perl -MCPAN -e "shell"'

    >
    > ... 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.
     
    Dave Hammond, Sep 7, 2006
    #5
  6. Dave Hammond

    brian d foy Guest

    In article <edp98f$r4t$>, David Squire
    <> wrote:


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

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


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

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

    --
    Posted via a free Usenet account from http://www.teranews.com
     
    brian d foy, Sep 8, 2006
    #6
  7. Dave Hammond

    Dave Hammond Guest

    Christian Winter wrote:
    > > Furthermore, if you want to install modules, just tell 'cpan' on the
    > > command line:
    > >
    > > % cpan Module::Name Some::Other::Module ...
    > >

    >
    > 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.
     
    Dave Hammond, Sep 13, 2006
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bill
    Replies:
    3
    Views:
    686
  2. carl d.
    Replies:
    1
    Views:
    407
    A. Sinan Unur
    May 10, 2005
  3. Replies:
    5
    Views:
    216
    Randy Kobes
    Oct 12, 2005
  4. Ben Bullock
    Replies:
    12
    Views:
    300
    Ben Bullock
    Jul 8, 2008
  5. David Warner

    CPAN Stopped being Recognized (MAC)

    David Warner, Apr 19, 2012, in forum: Perl Misc
    Replies:
    1
    Views:
    903
    Rainer Weikusat
    Apr 19, 2012
Loading...

Share This Page