develooper Front page | perl.perl5.porters | Postings from April 2007

[Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.7203.tar.gz]

John Peacock
April 17, 2007 19:10
[Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.7203.tar.gz]
Message ID:

The uploaded file


has entered CPAN as

  file: $CPAN/authors/id/J/JP/JPEACOCK/version-0.7203.tar.gz
  size: 53250 bytes
   md5: 796053989cb6e3ca3fb0c5b4e92cf109

I've released the above to CPAN to hopefully end the recent discussion
concerning version objects.  As soon as I get my perforce rights restored, I'll
sync up and produce a patch to bleadperl.

The highlighted changes are as follows:

1) Default stringification for numeric versions is the same string as was
passed to version->new(), on the principal of least surprise.  The same is true
for extended versions (except see #5).  Quoting the version object initializer
is aways the right thing to do.

2) The return value for the replacement UNIVERSAL::VERSION behaves identically
to stringification.

3) version->new() correctly duplicates version objects without a hitch.

4) version objects created with v-strings (5.6.0+) always stringify with a
leading 'v' (because there is a large range of Perl releases where we just can't
tell).  This is the last remaining exception to #1.

5) version objects have overloaded math comparisons (<=>) as well as overloaded
string comparisons (cmp); this is not new, but I wanted to emphasize that
resolving #1 meant that in the end, I didn't change this behavior.

Interested parties should download version-0.7203 from your CPAN mirror tomorrow
and test out any modules where you use version objects.



John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Blvd
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About