Skip Menu |

This queue is for tickets about the local-lib CPAN distribution.

Report information
The Basics
Id: 67875
Status: resolved
Priority: 0/
Queue: local-lib

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

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



Subject: strange order for PERL_LOCAL_LIB_ROOT
The PERL_LOCAL_LIB_ROOT environment variable is a private environment variable used by local::lib to manage its list of local::lib directories. I find that the current order in which the directories are listed is strange because it is reversed compared to all others variables of the same kind on POSIX systems: PATH, PERL5LIB, MANPATH. In all those variables, the most important directory is the first one. I propose to reverse the order of PERL_LOCAL_LIB_ROOT to be more consistent with the environment. This is just a cosmetic change that will not have side effects because: - PERL_LOCAL_LIB_ROOT is an internal variable that is managed only through local::lib (its content and in particular the order, has never been publicly documented) - the commands available to the user are "activate <path>" or "deactivate <path>": this is a list, not a stack. There is no concept of order in the local::lib code managing that variable, so there is no risk of strange behavior if different versions of local::lib are used in each local::lib environment. So no impact. - the order of PERL_LOCAL_LIB_ROOT is never used to construct values of other variables (PERL5LIB, PATH): adding is done in head, removing is done by filtering. So no impact. -- Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/
I missed a case where PERL_LOCAL_LIB_ROOT is used as a stack: to set PERL_M[MB]_OPT when a path is deactivated. However, to trigger that case it would require all the following conditions: - to have more than 3 paths in PERL_LOCAL_LIB_ROOT - that different versions of local::lib are present in each PERL_LOCAL_LIB_ROOT and they have different interpretation of PERL_LOCAL_LIB_ROOT - the bug could be triggered when the user deactivates either the first or the last item of the PERL_LOCAL_LIB_ROOT list So this is really unlikely. -- Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/
Sorry for taking so long to get back to this; can you supply a patch? If you have, can you point me at it again please?
The order will be changed to match the norm for other env vars in the next release.
Fixed in 1.008026