The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Pandoc::Version - version number of pandoc and its libraries

SYNOPSIS

  $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

DESCRIPTION

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 such version objects. Just use the instances returned by methods version and libs of module Pandoc and trust in 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

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 >=).

TO_JSON

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

SEE ALSO

version is a similar module for Perl version numbers.