NAME
Version::Dotted::Odd - TODO
VERSION
Version v0.0.0_04, released on 2016-12-27 20:03 UTC. This is a trial release.
WHAT?
TODO
SYNOPSIS
use Version::Dotted::Odd; # import nothing
use Version::Dotted::Odd qw{ qv }; # import qv
# Construct:
$v = Version::Dotted::Odd->new( v1.0 ); # v1.0.0 (at least 3 parts)
$v = qv( v1.0.2.5 ); # v1.0.2.5
# Release status:
if ( $v->is_trial ) { # If the second part is odd.
...
};
# Other methods are inherited from Version::Dotted.
DESCRIPTION
This is subclass of Version::Dotted
. Two features distinct it from the parent:
Version object always has at least 3 parts.
$v = qv( v1 ); # v1.0.0 $v->part( 0 ) == 1; # Parts 0, 1, 2 are always defined. $v->part( 1 ) == 0; # Zero if not specified explicitly. $v->part( 2 ) == 0; # ditto $v->part( 3 ) == undef; # But may be defined.
The second part defines the release status: odd numbers denotes a trial release.
$v = qv( v1.0 ); # $v == v1.0.0 $v->is_trial; # false $v += v0.1; # $v == v1.1.0 $v->is_trial; # true
Such versioning scheme was used by Linux kernel (between 1.0 and 2.6) and still used by Perl.
OBJECT METHODS
is_trial
Returns true if the second version part is an odd number, and false otherwise.
SEE ALSO
AUTHOR
Van de Bugger <van.de.bugger@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2016 Van de Bugger
License GPLv3+: The GNU General Public License version 3 or later <http://www.gnu.org/licenses/gpl-3.0.txt>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.