Bug#688842: CPAN modules no longer installed to /usr/local by default
Justification: maintainer opinion
On Wed, Sep 26, 2012 at 06:46:02AM +1100, Steve (Telsat Broadband) wrote:
> I believe I've uncovered a small bug relating to the default
> installation parameters when using CPAN. On my first try using CPAN
> on the latest Debian testing version (Wheezy), I found that it was
> installing all the modules I requested into /root/perl instead of in
> the proper directories.
Thanks for reporting this. They are indeed supposed to go in /usr/local
rather than /root by default when root is installing modules.
I'm filing this in our bug tracking system. I'm marking it as release
critical for now as CPAN bootstrapping is considered one of the primary
functions of the Perl standard library.
It looks like this is related to
2011-01-16 Andreas J. Koenig <email@example.com>
* release 1.94_63
* add support for bootstrapping local::lib when the user does not have
write access to perl's site library directories (David Golden)
When the site dirs don't exist, the CPAN shell interactive configuration states
Warning: You do not have write permission for Perl library directories.
and proceeds to suggest local::lib for installation, which is not the
optimal suggestion for root users.
We don't ship the site directories in /usr/local with the perl package,
as they used to be created at CPAN install time if necessary, and not
having them by default saves (or at least used to save) a bunch of stat()
calls on every interpreter startup in the common case.
Possibly we need to make CPAN::FirstTime try to mkdir those directories
Help (and opinions on the right thing to do) is welcome on this.
Niko Tyni firstname.lastname@example.org