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 `-> http://www.example.com/CPAN/ (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!
Re:How is this different?
chromatic on 2004-10-16T07:29:36
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?
Re:How is this different?
statico on 2004-10-16T13:27:42
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's mirror-finder that runs during installation. I don't know how it works exactly or if it does more than pinging, but I thought the auto-selection of "best mirrors" (whatever that implies) was neat.
Anyway, it seems like I suggested a simplificaton that, though worded differently, wouldn't really be an improvement. (CPAN::NotSimpleJustDifferent)