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

Re: [rt.cpan.org #70622] Versions Disappear

From:
David E. Wheeler
Date:
September 5, 2011 11:45
Subject:
Re: [rt.cpan.org #70622] Versions Disappear
Message ID:
E27D78C4-EC93-4D16-ACE3-5EF885F57AE3@kineticode.com
On Sep 4, 2011, at 6:39 AM, John Peacock wrote:

>> So let me see if I understand this correctly. Starting with Perl
>> 5.10, UNIVERSAL::VERSION returned a version object that, when used in
>> a string context, stringified to its original, declared form (which
>> for vstrings meant sprintf "v%vd").
> 
> Close; it always returned the stringified version object, not the version object itself.

Oh. Why not return the object?

>> But in bleed and version.pm
>> 0.92-0.94, UNIVERSAL::VERSION now returns exactly the same value as
>> $Foo::VERSION. Which kind of obviates the use of UNIVERSAL::VERSION
>> when called with no arguments, no?
> 
> That's it in a nutshell...
> 
>> I think if I had noticed this thread before I would have argued with
>> David Golden about this point. It seems to me that a version object
>> is far more useful in general than whatever crap happened to be put
>> into $VERSION -- and the latter can be fetched directly, anyway.\
> 
> I'm sorry I didn't fight harder, but at this point, I am as sick of version arguments as much as anyone.

I hear ya. Sorry to bring up old pains again.

Best,

David




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