# Get interactive CPAN shell. % perl -MCPAN -e shell # Just ask for upgrade recommendations. % perl -MCPAN -e 'CPAN::Shell->r' # Install the named module in batch mode. % perl -MCPAN -e "install Class::Multimethods"
The CPAN
module is an automated,
user-friendly interface to the Comprehensive Perl Archive Network
described in Chapter 22. Unlike
most modules you encounter, it's intended to be called from the
command line, just like a little program. The first time you call it,
the module prompts for the default CPAN mirror site and other
information it needs. After that, you can fire up its interactive
shell to make queries and select modules to install, ask the module
for recommendations on which modules need an upgrade, or just have it
install one particular module.