develooper Front page | perl.perl5.porters | Postings from September 2011

Re: [ #70622] Versions Disappear

Thread Previous | Thread Next
John Peacock
September 7, 2011 03:57
Re: [ #70622] Versions Disappear
Message ID:
On 09/06/2011 01:14 PM, David E. Wheeler wrote:
>>   [...]
>>   $ perl5.8.8 -Mversion -e '$VERSION=v120.100.103; print main->VERSION'
>>   v120.100.103
>>   Think about the implications of that for a module called 'Foo'. Even if
>>   Foo doesn't use, if is loaded anywhere then
>>   Foo->VERSION acts differently and gives a different value than is in
>>   $Foo::VERSION.
>> *Any* code written expecting the 5.8.8 behavior of ->VERSION breaks in
>> 5.10.0 or even in 5.8.8 if (prior to 0.92) is loaded by
>> *any* module.
> Yeah, that's clearly wrong. should not change global behavior like that. UNIVERSAL::VERSION should do its own thing IMNSHO. is a pseudo-pragma.  The whole point of the CPAN release was 
to make _any_ Perl act the same way regarding version comparisons. 
There is no way to make that happen without having a version-object 
aware UNIVERSAL::VERSION, which is why has exactly the same 
code as exists in the Perl core...


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About