NAME
App::newver::Version - Compare version number strings
SYNOPSIS
use App::newver::Versoin qw(version_compare);
my @sorted = sort { version_compare($a, $b) } qw(
1.0
1.1
1.0.1
1.0alpha1
);
DESCRIPTION
App::newver::Version is a module for comparing version strings. This is a private module, please consult the newver manual for user documentation.
App::newver::Version adapts most of its logic from libversion. This module can handle pre-release version components (alpha, beta, rc, etc.), post-release version components (post, patch, errata, pl, etc.), and normal numerical versions.
SUBROUTINES
Subroutines are not exported by default.
$r = version_compare($v1, $v2)
Compares two version strings and returns 1 if $v1 $v2>, -1 if $v1 < $v2, and 0 if $v1 == $v2.
@components = version_components($version)
Returns the list of version components from $version.
AUTHOR
Written by Samuel Young
This project's source can be found on its Codeberg page. Comments and pull requests are welcome.
COPYRIGHT
Copyright (C) 2025 Samuel Young.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.