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

NAME

Pandoc::Release - get pandoc releases from GitHub

SYNOPSIS

  use Pandoc::Release;

  my @releases = Pandoc::Release->list(since => '2.0', verbose => 1);
  foreach my $release (@releases) {

      # print version number
          say $release->{tag_name};

      # download Debian package and executable
      $release->download(arch => 'amd64', dir => './deb', bin => './bin');
  }

DESCRIPTION

This utility module fetches information about pandoc releases via GitHub API. It requires at least Perl 5.14 or HTTP::Tiny and JSON::PP installed.

METHODS

list( [ since => $version ] [ range => $range ] [, verbose => 0|1 ] )

Get a list of all pandoc releases at GitHub, optionally since some version and within a version range such as !=1.16, <=1.17 or ==2.1.2. See "Version Ranges" in CPAN::Meta::Spec for possible values. Option verbose will print URLs before each request.

download( arch => $arch, dir => $dir [, bin => $bin] [, verbose => 0|1] )

Download the Debian release file for some architecture (e.g. amd64) to directory dir, unless already there. Optionally extract pandoc executables to directory bin, each named by pandoc version number (e.g. 2.1.2). These executables can be used with constructor of Pandoc and with App::Prove::Plugin::andoc:

  my $pandoc = Pandoc->new("$bin/$version");

SEE ALSO

https://developer.github.com/v3/repos/releases/