.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Version::Compare 3" .TH Version::Compare 3 2023-07-26 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Version::Compare \- Compare version strings .SH VERSION .IX Header "VERSION" version 0.14 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Version::Compare; \& \& if(&Version::Compare::version_compare(\*(Aq2.6.26\*(Aq,\*(Aq2.6.0\*(Aq) == 1) { \& print "2.6.26 is greater than 2.6.0\en"; \& } .Ve .SH NAME Version::Compare \- Comparing version strings .SH SUBROUTINES/METHODS .IX Header "SUBROUTINES/METHODS" .SS max .IX Subsection "max" Return the bigger of the two numerical values .SS version_compare .IX Subsection "version_compare" Compare two unix-style version strings like 2.6.23.1 and 2.6.33 and return and sort-like return code (1 => LHS bigger, 0 => equal, \-1 => RHS bigger) .PP 0.0 < 0.5 < 0.10 < 0.99 < 1 < 1.0~rc1 < 1.0 < 1.0+b1 < 1.0+nmu1 < 1.1 < 2.0 .SS cmp .IX Subsection "cmp" See version_compare. .SH AUTHOR .IX Header "AUTHOR" Dominik Schulz, \f(CW\*(C`\*(C'\fR .SH BUGS .IX Header "BUGS" Please report any bugs or feature requests to \f(CW\*(C`bug\-version\-compare at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH SUPPORT .IX Header "SUPPORT" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc Version::Compare .Ve .PP You can also look for information at: .IP \(bu 4 RT: CPAN's request tracker .Sp .IP \(bu 4 AnnoCPAN: Annotated CPAN documentation .Sp .IP \(bu 4 CPAN Ratings .Sp .IP \(bu 4 Search CPAN .Sp .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2012 Dominik Schulz .PP This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. .PP See http://dev.perl.org/licenses/ for more information. .SH AUTHOR .IX Header "AUTHOR" Dominik Schulz .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2012 by Dominik Schulz. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.