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

Three patches to version code in the core

Thread Next
From:
John Peacock
Date:
December 7, 2011 18:39
Subject:
Three patches to version code in the core
Message ID:
4EDECB6A.6010903@havurah-software.org
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)...

John

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About