Pandoc::Version(3pm)

Pandoc::Version3pm

Version number of pandoc and its libraries

Usage

  $version = Pandoc::Version->new("1.17.2");     # create version
  $version = bless [1,17,2], 'Pandoc::Version';  # equivalent
  "$version";       # stringify to "1.17.2"
  $version > 1.9;   # compare
  $version->[0];    # major
  $version->[1];    # minor
  $version->match('1.17');   # true for 1.17, 1.17.x, 1.17.x.y...

Overview

This module is used to store and compare version numbers of pandoc executable and Haskell libraries compiled into pandoc. A Pandoc::Version object is an array reference of one or more non-negative integer values.

In most cases there is no need to create Pandoc::Version objects by hand. Just use the instances returned by methods "version" and "libs" of module Pandoc and trust in overloading.

Methods

string

Return a string representation of a version, for instance "1.17.0.4". This method is automatically called by overloading in string context.

number

Return a number representation of a version, for instance 1.017000004. This method is automatically called by overloading in number context.

cmp( $version )

Compare two version numbers. This is method is used automatically by overloading to compare version objects with strings or numbers (operators "eq", "lt", "le", "ge", "==", "<", ">", "<=", and ">=").

match( $version )

Return whether a version number matches another version number if cut to the same number of parts. For instance 1.2.3 matches 1, 1.2, and 1.2.3.

fulfills( $version_requirement )

Return whether a version number fullfills a version requirement, such as "!=1.16, <=1.17". See "Version Ranges" in CPAN::Meta::Spec for possible values.

To_json

Return an array reference of the version number to serialize in JSON format.

Releases

3 releases since Debian 10 (Buster); the text changed 2 times.

  1. 10
  2. 12
  3. 13

From libpandoc-wrapper-perl 0.9.2-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.