Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 103760
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: derek [...] boulder.swri.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: local::lib bootstrapping doesn't give full environment variable instructions
Date: Wed, 15 Apr 2015 14:32:39 -0600
To: bug-CPAN [...] rt.cpan.org
From: Derek Lamb <derek [...] boulder.swri.edu>
I tried to install a module via CPAN (2.00) on a clean OS X 10.10.1 installation. Before installation, I removed all of ~/.cpan. I ran the CPAN shell as a non-root user. It asked if I wanted to auto-config, I said "yes." It asked if I wanted to bootstrap local::lib. I said "yes". That went OK, then it told me to exit, and add the PERL_MB_OPT and PERL_MM_OPT environment variables to my shell config, restart the shell, and restart cpan shell. I did that. Installation of the module I was attempting, still did not work because I needed to set in my shell config file the variables PATH, PERL5LIB, and PERL_LOCAL_LIB_ROOT. After that, install worked OK. So basically I think that when cpan tells the user to exit and set some environment variables, it should tell the user about all of the variables, however pedantic it may seem. All the variables can be had with $ perl -I$HOME/perl5/lib/perl5 -Mlocal::lib
Hi, Derek. When I do this on Linux, I get this output: https://gist.github.com/dagolden/6cb094d5e24815230502 Could you please paste or post the comparable output that you're seeing? (I.e. after local::lib installs as part of the bootstrap?)
Subject: Re: [rt.cpan.org #103760] local::lib bootstrapping doesn't give full environment variable instructions
Date: Wed, 15 Apr 2015 16:19:11 -0600
To: bug-CPAN [...] rt.cpan.org
From: Derek Lamb <derek [...] boulder.swri.edu>
Hi David, I can, it'll take a bit—I shut the VM down. It showed that same thing, maybe without the offer of appending to ~/.bashrc (or ~/.profile in my case). I had no shell config file before this. I'm just suggesting that it should also have PATH PERL5LIB PERL_LOCAL_LIB_ROOT in the list of variables to add to the shell config (either manually or automatically). Otherwise the newly-installed local::lib can't even be found because PERL5LIB doesn't have ~/perl5/ … etc in it. Derek
Sorry, Derek. I misunderstood. You're missing the "Would you like to append?" line, right? I think all the environment variable are generated from local::lib, possibly there's been a change upstream there. I'll investigate.
Subject: Re: [rt.cpan.org #103760] local::lib bootstrapping doesn't give full environment variable instructions
Date: Wed, 15 Apr 2015 16:30:15 -0600
To: bug-CPAN [...] rt.cpan.org
From: Derek Lamb <derek [...] boulder.swri.edu>
Yes, I think I was missing that. But that's not my concern--the instructions for manually doing it were fine. My point is that in order to be newbie-friendly, cpan should also tell the user about PERL5LIB, etc in addition to PERL_MB_OPT. In fact it is necessary because otherwise the newbie's perl won't be able to find the newly installed local::lib.
Got it. There was a local::lib change. This should be fixed in recent CPAN.pm, but that doesn't help a vanilla Perl install with the old CPAN.pm. I'll take it up upstream with local::lib.
Subject: Re: [rt.cpan.org #103760] local::lib bootstrapping doesn't give full environment variable instructions
Date: Wed, 15 Apr 2015 19:45:49 -0400
To: "bug-CPAN [...] rt.cpan.org" <bug-CPAN [...] rt.cpan.org>
From: brian d foy <bdfoy [...] cpan.org>
Does the cpan command with the -l option still work or is this affected too? I think since I use the local::lib module, everything is set already and you don't have to set anything yourself.
I've submitted a pull-request upstream to local::lib: https://github.com/Perl-Toolchain-Gang/local-lib/pull/1
Subject: Re: [rt.cpan.org #103760] local::lib bootstrapping doesn't give full environment variable instructions
Date: Thu, 16 Apr 2015 12:26:36 -0600
To: bug-CPAN [...] rt.cpan.org
From: Derek Lamb <derek [...] boulder.swri.edu>
Hi Brian, Without setting the PERL5LIB, PATH, and PERL_LOCAL_LIB_ROOT environment variables, "cpan -l" (that's 'minus ell') returns a bunch of stuff, the last line of which is "perl5::lib::perl5::local::lib 2.000015" even though ~/perl5/lib/perl5 is not in @INC. Is that what you were asking about? If not, I'll need some clarification on your question (I notice "cpan -I" [minus EYE] is what loads local::lib).