Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

statico (5018)

AOL IM: eisforian (Add Buddy, Send Message)


Co-author of Perl Testing: A Developer's Notebook []

Journal of statico (5018)

Friday October 15, 2004
11:36 PM

simpler cpan installs

[ #21366 ]

Every time I introduce someone to maintaining a Perl installation I have to show them the ropes of a CPAN installation. When I teach my Perl course in November, I really wish I could say, "It's that simple" to add on modules.

I have a dream, and that dream smells like this:

Welcome to CPAN! Let's get started.
Are you managing a global Perl installation, or do you want to
simply install modules for your own local use? [local] ^M
Where would you like your modules to be stored? [~/site_perl] ~/perl^M
The CPAN modules are located on remote servers. Do you need to
specify a proxy server to connect to the internet? (You can type
"unsure" if you are not sure.) [no] ^M
Would you like me to automatically find the fastest CPAN mirror
available, or would do you have one in mind? [fastest] ^M
    - Downloading the list of CPAN mirrors...done
    - Finding fastest mirror...done
     `-> (ping: 80ms)
Okay, I'm now going to set up CPAN as best I can for you. Stick
with me here in case there are any problems along the way.
    - Terminal type is UTF-8
    - Module prerequisites will be followed
    - Finding external helper programs
    - Setting module installation options
Everything looks OK. I'm now going to download and install some
basic Perl modules.
    * Installing Bundle::CPAN...
        - Downloading...done
        - Building...needs prequisites!
    * Installing ...
All of the modules were installed successfully.
You seem to be using the bash shell. Should I modify your .bashrc
to set up your PERL5LIB environment variable correctly? [Y/n] ^M
If you have CGI scripts that need to use these modules, you'll
need to add 'use lib "~/perl";' to the tops of the scripts (after
the line starting with "#!", if there is one).
We're all done!
To install modules in the future, run `cpan-simple install
Name::Of::Module'. To search for modules, run `cpan-simple search
Something'. For other commands, run `cpan-simple help'.
Thank you, valiant Perl user!

I know the hardcore people will say I'm stupifying things, but
hey, why not. CPAN::Simple, anyone?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • The CPAN::Shell shell asks the absolute minimum questions. Most of what it comes up with can simply be processed by hitting return a few times. And "least ping time" is not a good way to choose a mirror. Etc.
    • Randal L. Schwartz
    • Stonehenge
    • What's easier, hitting Enter or not hitting Enter?

      As long as there's a way for experts or people who need to do advanced things to do advanced things (without editing XML by hand or using gconf, which is the next worst thing), what's the problem?

    • Okay, maybe this post would have been more justified with a little context:

      This idea came from someone else's suggestion of uploading a module that would package/include other distributions with it. The reason for doing this was because people weren't using CPAN [correctly] once they installed the main program. I thought, Well, instead of creating a distribution with a pile of other distributions in it, why not solve those people's issues with using CPAN instead?

      As for the pings, I was reminded of Gentoo'
      qw(Ian Langworth)