Version::Util - Version-number utilities
This document describes version 0.730 of Version::Util (from Perl distribution Version-Util), released on 2018-01-09.
This module provides several convenient functions related to version numbers, e.g. for comparing them.
Equivalent to:
version->parse($v1) <=> version->parse($v2)
Add $increment to version $v. Both increment and version must match:
$increment
$v
/\Av?\d{1,3}(?:\.\d{1,3}){0,2}\z/
so trial/dev releases like v1.2.3_1 are not currently supported. Some examples:
v1.2.3_1
0.1 + 0.1 -> 0.2 0.01 + 0.001 -> 0.011 0.01 + 0.1 -> 0.11 0.9 + 0.1 -> 1.0 0.99 + 0.1 -> 1.09 1.1.0 + 0.0.1 -> 1.1.1
Subtract $decrement from version $v. This is the reverse operation for add_version.
$decrement
add_version
Will die if the result is negative.
Please visit the project's homepage at https://metacpan.org/release/Version-Util.
Source repository is at https://github.com/perlancar/perl-Version-Util.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Version-Util
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
version
perlancar <perlancar@cpan.org>
This software is copyright (c) 2018, 2014 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Version::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Version::Util
CPAN shell
perl -MCPAN -e shell install Version::Util
For more information on module installation, please visit the detailed CPAN module installation guide.