Python::Version - Python PEP440 compatible version string parser in Perl
version 0.0000_01
use Python::Version; my $v = Python::Version->parse("1.2.3pre2.dev1+ubuntu-1"); print($v->normal); print($v->original); # Comparing versions if ( version->parse($vstr1) == version->parse($vstr2) ) { # do stuff } # Sorting mixed version styles my @ordered = sort { version->parse($a) <=> version->parse($b) } @list;
This module provides a parser as well as comparion method for Python PEP440 compatible version string.
Class method. It takes a PEP440-compatible string and returns a Python::Version object.
Returns local version label.
Returns a string with a standard normalized form.
Returns the original version string which was used to create the object.
Returns the public version.
PEP 440 https://www.python.org/dev/peps/pep-0440/
Stephan Loyd <sloyd@cpan.org>
This software is copyright (c) 2018 by Stephan Loyd.
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 Python::Version, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Python::Version
CPAN shell
perl -MCPAN -e shell install Python::Version
For more information on module installation, please visit the detailed CPAN module installation guide.