<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME

    Python::Version - Python PEP440 compatible version string parser in
    Perl

VERSION

    version 0.0002

SYNOPSIS

        use Python::Version;
        
        my $v = Python::Version-&gt;parse("1.2.3pre2.dev1+ubuntu-1");
        
        print($v-&gt;normal);
        print($v-&gt;original);
    
        # Comparing versions
         
        if ( Python::Version-&gt;parse($vstr1) == Python::Version-&gt;parse($vstr2) ) {
          # do stuff
        }
         
        # Sorting versions
         
        my @ordered = sort { Python::Version-&gt;parse($a) &lt;=&gt; Python::Version-&gt;parse($b) } @list;

DESCRIPTION

    This module provides a parser as well as comparion method for Python
    PEP440 compatible version string.

METHODS

 parse($version_str)

    Class method. It takes a PEP440-compatible string and returns a
    Python::Version object.

        my $v = Python::Version-&gt;parse($version_str);

 base_version()

    Returns the normalized base part of the version.

 is_prerelease()

    Returns a boolean value for if the version is a pre-release.

 is_postrelease()

    Returns a boolean value for if the version is a post-release.

 is_devrelease()

    Returns a boolean value for if the version is a dev-release.

 local()

    Returns the normalized local version label.

 normal()

    Returns a string with a standard normalized form.

 original()

    Returns the original version string which was used to create the
    object.

 public()

    Returns the normalized public version.

SEE ALSO

    PEP 440 https://www.python.org/dev/peps/pep-0440/

AUTHOR

    Stephan Loyd &lt;sloyd@cpan.org&gt;

CONTRIBUTOR

    perlancar &lt;perlancar@cpan.org&gt;

COPYRIGHT AND LICENSE

    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.

</pre></body></html>