Closed GavinSmith0123 closed 4 years ago
I'll have a look.
Any news on this?
One solution would be to set $VERSION in every module, and then somehow require that as the minimum version (because you cannot require an exact version in Perl). That should fix the problem, too, shouldn't it?
Sorry, I don't see what that has to do with module search paths.
Perl would then not consider the installed versions of libintl-perl, when the version is lower than the one of the uninstalled version.
But I am also considering your suggestion. In my opinion it kind of defeats the purpose of ignoring '.' in @INC
but on the other hand I actually always meant that people that put .
in their $PATH
do not really deserve any protection by the software because it's downright stupid. On the other hand, having relative paths in @INC
usually means that you know what you're doing.
I will solve your problem one way or other this week. Apologies again for the long delay.
Thanks for coming back to this issue. This seems to assume that the installed version is an older version than the uninstalled version, but the opposite is possible too.
Should be fixed with 275b1e2.
Thanks, I'll give it a try. Is there a new release of libintl-perl planned soon?
Yes, sure. I just need a free time slot. I'll try to do it tomorrow.
And today I managed to do it. Version 1.32 is now available.
If a Perl program adds relative paths to
@INC
in order to use an uninstalled copy of libintl-perl, then some of the uninstalled modules in the library will be loaded, but some installed modules will be used too in an installed copy of libintl-perl. This is due to this change:https://github.com/gflohr/libintl-perl/commit/74f3a35cc24a54ada3bbef96d79e63a0592b7f18
The uninstalled version of Locale::Messages will be used but it won't load an uninstalled version of Locale::gettext_pp. (This is the case in the Texinfo project after libintl-perl was upgraded to 1.31 from 1.20.)
This is not desirable behaviour, as there might not be an installed version of the module, or it might be from a different version of libintl-perl and not compatible. It is confusing when trying to track the execution of the code, when for example inserted print statements in the uninstalled code do not do anything.
Maybe one fix is to only remove '.' from
@INC
, and not just any relative path, as suggested at http://article.gmane.org/gmane.comp.lang.perl.perl5.porters/160507:Or maybe leave it up to any program using libintl-perl to take care of the potential security problems involved in using relative paths in
@INC
.