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

A modest proposal regarding version.pm and base.pm

Thread Next
From:
John Peacock
Date:
September 18, 2011 19:03
Subject:
A modest proposal regarding version.pm and base.pm
Message ID:
4E76A305.5080001@havurah-software.org
I need to do another CPAN release for version.pm because of this:

   https://rt.cpan.org/Ticket/Display.html?id=70950

Can I please revert the change to the replacement UNIVERSAL::VERSION so 
that it once again returns a stringified version object, rather than the 
contents of the package $VERSION scalar?

Attached is a patch to base.pm that accomplishes two things:

1) removes the utterly insane '-1, set by base.pm' nonsense
2) replaces it with the string 'undef' (NOT the undef value)

That string is special to version.pm, and does not throw an error (it 
also evaluates as a 0 version).  Thus, we preserve base.pm's ability to 
add packages that failt to declare $VERSION in the symbol table.  But we 
do it in such a way that does not throw an error from version.pm.

Let the arguments begin...

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