Configuration

When the CPAN module is installed, a site-wide configuration file is created: CPAN/Config.pm. The default values defined there can be overridden locally in the file CPAN/MyConfig.pm. You can store this file in $HOME/.cpan/CPAN/MyConfig.pm, because $HOME/.cpan is added to the search path of the CPAN module before the use or require statements. Chapter 2 lists the keys defined in the hash reference $CPAN::Config and how to set and query them.

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.