Skip Menu |

This queue is for tickets about the App-perlbrew CPAN distribution.

Report information
The Basics
Id: 60918
Status: open
Priority: 0/
Queue: App-perlbrew

Owner: Nobody in particular
Requestors: apeiron [...]

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

Subject: perlbrew switch leaves old PERL5LIB around
Download (untitled) / with headers
text/plain 640b
If a user sets PERL5LIB (probably most commonly via local::lib) and uses perlbrew switch, it's possible that the switched-to perl is incompatible with the old PERL5LIB, causing problems. This is a difficult problem to solve automatically, because perhaps the user set PERL5LIB themselves in such a way that it *will* work with the switched-to perl. I'm filing this bug as a means to start discussion of how to handle the situation. A suggestion from edenc on IRC is for l::l to set an environment variable that perlbrew looks at and uses to reset PERL5LIB when doing a perlbrew switch. I'd like input on this as I consider it myself.
Download (untitled) / with headers
text/plain 1.2k
perlbrew do not alter PERL5LIB at all and should probably leave it alone, IMHO. Generally I'd think it'd require a new mechanism like rubygem's to deal with module/perl compatibility issue, and that is another project. local::lib paths generally are looked up before perl built-in @INC, which means, at worst case, a module in local::lib can be incompatible to as many perls as perlbrew builds. And there is no way to deal with but to either upgrade that module to a more compatible version, or to disable local::lib. Version information from local::lib can't be enough to deal with a problem that can be this crazy. Luckily, perl itself is very backward compatible so it's usually fine in many cases. It would be easier to let perlbrew acts as a full wrapper for perl execution, a command like 'perlbrew exec perl ...' can guarantee the side-effect of local::lib are eliminated by unsetting relevant env variables. On the other hand, rvm has a 'gemset' command that take cares of local gem management, which is a feature I would like to steal to provide a quicker and easer cpan module management when using perlbrew. At this moment, I'd recommend to use local::lib to create an app-specific environment for just one app. However I'm not aware of any quick and handy tool for such purpose.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to