@EXPORT = qw(qv);
-$VERSION = "0.43";
+$VERSION = "0.47";
$CLASS = 'version';
$v = version->new( 1.002_03); # 1.2.30 See "Quoting"
$v = version->new( 1.002003); # 1.2.3
-All of the preceeding examples except the second to last are true
+All of the preceding examples except the second to last are true
whether or not the input value is quoted. The important feature is that
the input value contains only a single decimal.
B<may> only support numeric comparisons. See also L<"Quoting">.
WARNING: Comparing version with unequal numbers of decimal places (whether
-explicitely or implicitely initialized), may yield unexpected results at
+explicitly or implicitly initialized), may yield unexpected results at
first glance. For example, the following inequalities hold:
version->new(0.96) > version->new(0.95); # 0.960.0 > 0.950.0
Alpha versions with a single decimal place will be treated exactly as if
they were L<Numeric Versions>, for parsing purposes. The stringification for
-alpha versions with a single decimal place may seem suprising, since any
+alpha versions with a single decimal place may seem surprising, since any
trailing zeros will visible. For example, the above $alphaver will print as
12.03_0100
$module->VERSION function returns a string (PV) that can be converted to a
number following the normal Perl rules, when used in a numeric context.
+=head1 SUBCLASSING
+
+This module is specifically designed and tested to be easily subclassed.
+In practice, you only need to override the methods you want to change, but
+you have to take some care when overriding new() (since that is where all
+of the parsing takes place). For example, this is a perfect acceptable
+derived class:
+
+ package myversion;
+ use base version;
+ sub new {
+ my($self,$n)=@_;
+ my $obj;
+ # perform any special input handling here
+ $obj = $self->SUPER::new($n);
+ # and/or add additional hash elements here
+ return $obj;
+ }
+
+See also L<version::AlphaBeta> on CPAN for an alternate representation of
+version strings.
+
=head1 EXPORT
qv - quoted version initialization operator