Author image Peter Sergeant
and 1 contributors


Gherkin - a parser and compiler for the Gherkin language


A parser and compiler for the Gherkin language


This is a very light-weight port of the Gherkin project to Perl. It is an almost line for line rewrite of the Python version, at that URL.

It contains no user-serviceable parts.

If you are looking to use Cucumber and Perl, please look at Test::BDD::Cucumber.

The code is mostly written in baby Perl. If you dig through the git history, you'll find a first version written using Moose, with delegation, roles, the works. It was pretty, but it was slow. There's a refactor in the history of it then moving to Moo, but that was also too slow, and you had to know Moo (or Moose) to make sense of it, and this module will probably be updated by the maintainers of the Gherkin project, who don't even know Perl.


I envisage a need to release more than one version on CPAN for each version of the upstream Gherkin project. The first release of this module for Gherkin version 1.2.3 will be 1.2.0301, the second will be 1.2.0302, and so on.


If you're writing a tool which needs to parse Gherkin, and you already know about the data model and ast, then the examples in bin/ will be interesting to you, as will all the documentation at: Gherkin


Please see the included LICENSE.txt for the canonical version. In summary:

The MIT License (MIT)

Copyright (c) 2016 Peter Sergeant

This work is a derivative of work that is: Copyright (c) 2014-2016 Cucumber Ltd, Gaspar Nagy