From: David Golden Date: Mon, 25 Jan 2010 20:55:52 +0000 (-0500) Subject: revise package NAME VERSION entry in perl5120delta X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=252eec4f29eab31287b026fff962e72e3507d34d;p=p5sagit%2Fp5-mst-13.2.git revise package NAME VERSION entry in perl5120delta --- diff --git a/pod/perl5120delta.pod b/pod/perl5120delta.pod index 9225e86..a5b2d99 100644 --- a/pod/perl5120delta.pod +++ b/pod/perl5120delta.pod @@ -330,7 +330,7 @@ character arrays as addresses: They start with nul byte and are not terminated by nul byte, but with the length passed to the socket() system call. -=head2 Add C syntax +=head2 New C syntax This new syntax allows a module author to set the $VERSION of a namespace when the namespace is declared with 'package'. It eliminates the need @@ -345,7 +345,7 @@ There are several advantages to this: =item * -C<$VERSION> is parsed in I the same way as C +C<$VERSION> is parsed in exactly the same way as C =item * @@ -353,6 +353,12 @@ C<$VERSION> is set at compile time =item * +C<$VERSION> is a version object that provides proper overloading of +comparision operators so comparing C<$VERSION> to decimal (1.23) or +dotted-decimal (v1.2.3) version numbers works correctly. + +=item * + Eliminates C<$VERSION = ...> and C clutter =item * @@ -363,19 +369,17 @@ without C the way MM-Eparse_version does for C<$VERSION = ...> =item * -Alpha versions with underscores do not need to be quoted; static -parsing will preserve the underscore, but during compilation, Perl -will remove underscores as it does for all numeric literals - It does not break old code with only C, but code that uses -C will need to be restricted to perl 5.11.X or newer +C will need to be restricted to perl 5.12.0 or newer This is analogous to the change to C from two-args to three-args. -Users requiring the latest Perl will benefit, and perhaps N years from -now it will become standard practice when Perl 5.12 is targeted the way -that 5.6 is today. +Users requiring the latest Perl will benefit, and perhaps after several +years, it will become a standard practice. =back +However, C requires a new, 'strict' version +number format. See L<"Version number formats"> for details. + =head1 Incompatible Changes =head2 Version number formats