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

Three patches to version code in the core

Thread Next
John Peacock
December 7, 2011 18:39
Three patches to version code in the core
Message ID:
Attached are three patches:

1) Reverts the incompatible change to UNIVERSAL::VERSION such that once 
again it will return the stringified version object representation of 
$CLASS::VERSION.  A long sidebar with David Golden, myself, and two 
different pumpkings came to the conclusion that the original code is 
less bad.  There may be a future patch to make it return a version 
object (but only for 5.16.x and above), but that is still pending a 
ruling from the bench.

2) I discovered in perlguts that there is already an accepted method to 
determine if a given scalar is both a blessed object and derived from a 
given class name, so all such code version objects will use this instead 
of assuming SvROK(sv) is sufficient.

3) Clean up the version.t file with the forthcoming CPAN release, 
include reverting the test for the case in patch #1.

These are supposed to be non-controversial (now that #1 has been 
decided) and really need to get in now (before 5.15.6)...


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