.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 turned on, 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::Next 3pm" .TH Version::Next 3pm "2016-02-28" "perl v5.22.1" "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::Next \- increment module version numbers simply and correctly .SH "VERSION" .IX Header "VERSION" version 1.000 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Version::Next qw/next_version/; \& \& my $new_version = next_version( $old_version ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides a simple, correct way to increment a Perl module version number. It does not attempt to guess what the original version number author intended, it simply increments in the smallest possible fashion. Decimals are incremented like an odometer. Dotted decimals are incremented piecewise and presented in a standardized way. .PP If more complex version manipulation is necessary, you may wish to consider Perl::Version. .SH "USAGE" .IX Header "USAGE" This module uses Sub::Exporter for optional exporting. Nothing is exported by default. .ie n .SS """next_version""" .el .SS "\f(CWnext_version\fP" .IX Subsection "next_version" .Vb 1 \& my $new_version = next_version( $old_version ); .Ve .PP Given a string, this function make the smallest logical increment and returns it. The input string must be a \*(L"lax\*(R" version numbers as defined by the version module. The string \*(L"undef\*(R" is treated as \f(CW0\fR and incremented to \f(CW1\fR. Leading or trailing periods have a \f(CW0\fR (or \f(CW\*(C`v0\*(C'\fR) prepended or appended as appropriate. For legacy reasons, given no argument or a literal \f(CW\*(C`undef\*(C'\fR (not the string \*(L"undef\*(R"), the function returns \f(CW0\fR. .PP Decimal versions are incremented like an odometer, preserving the original number of decimal places. If an underscore is present (indicating an \*(L"alpha\*(R" version), its relative position is preserved. Examples: .PP .Vb 5 \& 0.001 \-> 0.002 \& 0.999 \-> 1.000 \& 0.1229 \-> 0.1230 \& 0.12_34 \-> 0.12_35 \& 0.12_99 \-> 0.13_00 .Ve .PP Dotted-decimal versions have the least significant element incremented by one. If the result exceeds \f(CW999\fR, the element resets to \f(CW0\fR and the next most significant element is incremented, and so on. Any leading zero padding is removed. Examples: .PP .Vb 3 \& v1.2.3 \-> v1.2.4 \& v1.2.999 \-> v1.3.0 \& v1.999.999 \-> v2.0.0 .Ve .PP \&\fB\s-1NOTE\s0\fR: Due to changes in the interpretation of dotted-decimal version numbers with alpha elements in version 0.9913 and later, the notion of the 'next' dotted-decimal alpha is ill-defined. Version::Next no longer supports dotted-decimals with alpha elements and a fatal exception will be thrown if one is provided to \f(CW\*(C`next_version\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 version .IP "\(bu" 4 Perl::Version .SH "SUPPORT" .IX Header "SUPPORT" .SS "Bugs / Feature Requests" .IX Subsection "Bugs / Feature Requests" Please report any bugs or feature requests through the issue tracker at . You will be notified automatically of any progress on your issue. .SS "Source Code" .IX Subsection "Source Code" This is open source software. The code repository is available for public review and contribution under the terms of the license. .PP .PP .Vb 1 \& git clone https://github.com/dagolden/Version\-Next.git .Ve .SH "AUTHOR" .IX Header "AUTHOR" David Golden .SH "CONTRIBUTOR" .IX Header "CONTRIBUTOR" Grzegorz Rożniecki .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2016 by David Golden. .PP This is free software, licensed under: .PP .Vb 1 \& The Apache License, Version 2.0, January 2004 .Ve