What is module version numbers in Perl?

In Perl, module version numbers are used to indicate the version of a module that is being used. This helps developers manage dependencies and ensure compatibility between different modules within their Perl applications.

Version numbers typically follow the semantic versioning format: MAJOR.MINOR.PATCH (e.g., 1.2.3). Each component signifies different levels of changes:

  • MAJOR: Increments indicate incompatible changes or major new features.
  • MINOR: Increments indicate the addition of functionality in a backwards-compatible manner.
  • PATCH: Increments indicate backwards-compatible bug fixes.

The version number can be declared in a Perl module as follows:

package MyModule; use strict; use warnings; our $VERSION = '1.0.0';

module version numbers Perl versioning semantic versioning Perl modules