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 version.pm, if version.pm 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 version.pm (prior to 0.92) is loaded by >> *any* module. > > Yeah, that's clearly wrong. version.pm should not change global behavior like that. UNIVERSAL::VERSION should do its own thing IMNSHO. version.pm 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 version.pm has exactly the same code as exists in the Perl core... JohnThread Previous | Thread Next