Skip Menu |

This queue is for tickets about the version CPAN distribution.

Report information
The Basics
Id: 41732
Status: resolved
Priority: 0/
Queue: version

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

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



Subject: Issue with version.pm, locales, threads, and grues
Hi John, this is probably going to be a somewhat fuzzy description of the issue. Please accept my apologies. version.pm's VERSION needs to be set as a string, not a float. If it's a float and locales are set to use , as radix, the eval that tries to load version::vxs will fail because $VERSION interpolates to 0,76 which will be interpreted as a list by the compiler, the pp_require hook won't consider it a version, Exporter will be used instead and... the rest is history. While pestering #p5p about this, I was also made aware that the eval should really add a '1;' to the end of the "use version::vxs $VERSION" to become "use version::vxs $VERSION; 1;". This is because apparently, older perls have issues otherwise. I would supply a formal patch, but since this is a one-line change, I assume you're fine without. Thanks for reading and especially thanks for enduring all the horror that is required to get saner versions in perl! Best regards, Steffen
On Mon Dec 15 16:30:56 2008, SMUELLER wrote: Show quoted text
> version.pm's VERSION needs to be set as a string, not a float. If it's a > float and locales are set to use , as radix, the eval that tries to load > version::vxs will fail because $VERSION interpolates to 0,76 which will > be interpreted as a list by the compiler, the pp_require hook won't > consider it a version, Exporter will be used instead and... the rest is > history.
I'll fix this another way, since $VERSION should really always be a number, never a string (except when using alpha releases with an underscore). It is really pp_require's bad form causing problems, but I can work around it now that I am aware of the problem. Testing it portably is going to be a bitch, but that's what I'm used to... Show quoted text
> While pestering #p5p about this, I was also made aware that the eval > should really add a '1;' to the end of the "use version::vxs $VERSION" > to become "use version::vxs $VERSION; 1;". This is because apparently, > older perls have issues otherwise.
I don't know who told you that, but I believe they are wrong. I test with 5.00504 all the way up to bleadperl and I have never had any problems. I think this is a cargo-cultism based on the requirement to return a true value at the end of a package declaration. John
This will be fixed in 0.77 (released RSN)... Thanks