Perl::Version

Parse and manipulate Perl version strings
Download

Perl::Version Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Andy Armstrong
  • Publisher web site:
  • http://search.cpan.org/~andya/

Perl::Version Tags


Perl::Version Description

Parse and manipulate Perl version strings Perl::Version is a Perl module that provides a simple interface for parsing, manipulating and formatting Perl version strings.Unlike version.pm (which concentrates on parsing and comparing version strings) Perl::Version is designed for cases where you'd like to parse a version, modify it and get back the modified version formatted like the original.SYNOPSIS use Perl::Version; # Init from string my $version = Perl::Version->new( '1.2.3' ); # Stringification preserves original format print "$version\n"; # prints '1.2.3' # Normalised print $version->normal, "\n"; # prints 'v1.2.3' # Numified print $version->numify, "\n"; # prints '1.002003' # Explicitly stringified print $version->stringify, "\n"; # prints '1.2.3' # Increment the subversion (the third component) $version->inc_subversion; # Stringification returns the updated version formatted # as the original was print "$version\n"; # prints '1.2.4' # Normalised print $version->normal, "\n"; # prints 'v1.2.4' # Numified print $version->numify, "\n"; # prints '1.002004' # Refer to subversion component by position ( zero based ) $version->increment( 2 ); print "$version\n"; # prints '1.2.5' # Increment the version (second component) which sets all # components to the right of it to zero. $version->inc_version; print "$version\n"; # prints '1.3.0' # Increment the revision (main version number) $version->inc_revision; print "$version\n"; # prints '2.0.0' # Increment the alpha number $version->inc_alpha; print "$version\n"; # prints '2.0.0_001' Requirements: · Python


Perl::Version Related Software