Subject: | Ensure archlib exists on local::lib setup time |
Date: | Thu, 13 Jun 2013 13:49:49 -0700 |
To: | bug-Module-Install [...] rt.cpan.org |
From: | Tatsuhiko Miyagawa <miyagawa [...] gmail.com> |
re: https://github.com/miyagawa/cpanminus/issues/263
When you setup local::lib on the shell, you'll get environment
variables such as:
export PERL5LIB="/Users/miyagawa/perl5/lib/perl5:$PERL5LIB";
suppose you don't have the ~/perl5/lib/perl5 directory yet, and run
perl with that PERL5LIB, your @INC looks like:
@INC:
/Users/miyagawa/perl5/lib/perl5
/Users/miyagawa/.plenv/versions/5.18.0/lib/perl5/site_perl/5.18.0/darwin-2level
...
Once you have installed at least one arch-dependent (XS) module, your
@INC becomes:
@INC:
/Users/miyagawa/perl5/lib/perl5/darwin-2level
/Users/miyagawa/perl5/lib/perl5
/Users/miyagawa/.plenv/versions/5.18.0/lib/perl5/site_perl/5.18.0/darwin-2level
...
If you 'use local::lib' in your code, this isn't an issue since
local::lib puts archlib in @INC explicitly. With PERL5LIB, perl
doesn't put archlib unless the directory exists :/
mst and I talked on irc and wonder if it is a good idea to ensure to
mkdir archlib in the local::lib setup/bootstrap time.
--
Tatsuhiko Miyagawa