develooper Front page | perl.perl5.porters | Postings from January 2014

Re: about commit "vxs.inc: Integrate the CPAN version of version_new"

Thread Previous
From:
John Peacock
Date:
January 5, 2014 01:06
Subject:
Re: about commit "vxs.inc: Integrate the CPAN version of version_new"
Message ID:
52C8B01D.80301@havurah-software.org
On 01/04/2014 07:59 PM, Father Chrysostomos wrote:
> It makes no difference whether the string here is "undef" or "0",
> since the version-parsing routines produce equivalent version objects
> either way.

The string "undef" and undef are equivalent to 0, so you can do 
something like

	$v = version->new();

and get an object instead of an error.

> So I will leave it up to John Peacock to decide whether the CPAN ver-
> sion should change (and then core will pick it up with the next vxs.inc
> synch).  I think the "0" would be marginally more efficient.

The CPAN release is already consistent with the core version.  This is 
sufficiently an edge case that I don't think optimization makes any sense.

John


Thread Previous


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