The Perl Advent Calendar needs more articles for 2022. Submit your idea today!
Revision history for PPR

0.000001  Wed May 27 15:12:24 2015

    * Initial release.

0.000003  Tue Jun 20 06:05:22 2017

    * No changes logged

0.000005  Tue Jun 20 19:27:37 2017

    * Added missing PPR::X module
      (Thanks MST)

0.000006  Thu Jun 22 21:04:14 2017

    * Fixed documentation bug with slurp (pre-)example.
      (Thanks, Randal!)

    * Optimized matching of builtins slightly

    * Added $PPR::ERROR variable to assist error reporting on failure to match
      (Many thanks, MST!)

0.000007  Fri Jun 23 06:45:49 2017

    * Improved $PPR::ERROR API by adding origin location and diagnostics

0.000008  Sun Jun 25 15:24:13 2017

    * Unknotted POD nits.

    * Small optimizations to keyword and identifier recognition.

    * Fixed handling of multiline quotelikes that span heredoc contents.
      (Thanks Lukas)

    * SIGNIFICANT CHANGE: The $PPR::GRAMMAR variable now has to be
      interpolated at the start of any regex using it.

    * Fixed handling of layered heredocs (at the cost of having to install
      $PPR::GRAMMAR at the start of each grammar).
      (Thanks Lukas)

    * Fixed diamond operator parsing.
      (Thanks Lukas)

0.000009  Thu Jun 29 08:17:24 2017

    * SIGNIFICANT REVERSION: The $PPR::GRAMMAR variable no longer
      has to be interpolated at the start of any regex using it.
      Indeed, that placement is not recommended due to its effects
      on the numbering of positional captures within the main regex.

    * Fixed test files to allow testing under 5.10+, rather than 5.14+

0.000010  Fri Jul 14 07:36:47 2017

    * Added yada-yada (...) statement
      (Thanks, MST!)

0.000011  Fri Aug 11 17:52:14 2017

    * Further optimized parsing of heredocs

    * Eliminated even more repetition backtracking
      (bringing the grammar ever closer to DFA-osity)

    * Micro-optimization: Reordered PerlOWS and PerlNWS components to
      reflect that \n whitespace is more common that # comments or
      __END__ blocks

    * Made formats and heredocs play nice together by adding a potential
      heredoc skip at the end of the first line of a format.
      (Sincere thanks to Merijn)

    * Made interpolating quotelikes work (more) correctly.

0.000012  Mon Aug 21 20:40:08 2017

    * Handled /.../n flag
      (thanks, David)

    * Handled leading BOM correctly
      (thanks, David)

    * Handled ${!}-style punctuation variables
      (thanks, David)

    * "fline" is not a word (thanks, Hugo ;-)

    * Added (?&PerlEndOfLine)
      (Thanks, Yves)

    * Handled s/.../.../e behaviour better.
      Still not perfect, but perfection may not be possible using regexes.
      (Thanks, Aaron!)

    * Neutralized bizarre undefined warnings
      under earlier Perl versions.

0.000013  Mon Aug 21 20:54:42 2017

    * Removed spurious Regexp::Debugger dependency
      (Thanks Slaven!)

0.000014  Thu Sep 28 21:43:51 2017

    * Added BAIL_OUTs to test suite to accelerate
      and clarify testing under Perl 5.20

    * Added missing optional whitespace to DESTROY and AUTOLOAD declarations
      (thanks, Hauke D)

0.000015  Wed Dec  6 08:18:09 2017

    * Fixed disapproval.t test
      (Thanks, Martin!)

    * Fixed handling of ->$*, ->@*, and ->%*
      (Thanks, Curtis!)

0.000016  Mon Jun  4 13:58:06 2018

    * Uninlined optimizations in PPR::X to make redeclaration
      of subrules easier and more reliable.
      (Thanks, Matt!)

    * Added (?&PerlReturnExpression) to distinguish
      in-term usages from statement-level usages
      requiring (?&PerlReturnStatement)

0.000017  Tue Jun 19 07:57:57 2018

    * Added PPR::decomment()
      (mostly as an example of technique)

    * Updated for loop parsing to support explicitly aliased iterator variables
      (including arrays and hashes)

    * Added (?&PerlTermPostfixDereference) to simplify PPR::X overloading of terms

    * Added Perl 5.28 ":attributes(before) ($ignature)" syntax for subroutines
      (thanks, Matt)

0.000018  Mon Jun 25 09:59:36 2018

    * Fixed _uniq()
      (thanks Adriano!)

0.000019  Tue Jun 26 19:33:17 2018

    * Fixed parsing of multiple POD sections
      (thanks Adriano!)

0.000020  Tue Jun 26 19:54:42 2018

    * Oops, fixed decomment() too.

    * Updates PPR::X appropriately as well.

0.000021  Wed Jun 27 06:33:51 2018

    * Removed spurious Regexp::Debugger dependency
      (thanks, Adriano)

    * Fixed edge case on POD/whitespace parsing
      (thanks, Adriano)

0.000022  Fri Oct  5 07:10:33 2018

    * Optimized calls to (?&PerlStatementSequence) and (?&PerlPodSequence)
      (thanks, Adriano)

    * Optimized several tests to remove unnecessary (?&PerlOWS) calls
      (thanks, Adriano)

0.000023  Fri Feb 15 09:20:25 2019

    * Fixed (?&PerlScalarExpression)

0.000024  Tue Dec 10 05:20:23 2019

    * Relaxed parsing of __DATA__ and __END__ in line with actual Perl parser

    * Numerous doc bugs fixed (thanks F.Li!)

0.000025  Wed Apr 22 22:19:14 2020

    * Added full code block parsing of
      (?{...}) and (??{...}) within regexes

    * Fixed an obscure problem when heredocs are greater than 32766 characters
      (thanks Albert!)

0.000026  Fri Apr 24 04:39:59 2020

    * Improved detection of trailing unbalanced curlies in decomment()
      (thanks Albert)

    * Added (?&PerlEntireDocument) rule

      PPR::decomment() now retains all newlines from any comments, POD, etc.
      that it removes. This does not change the meaning or behaviour
      of the decommented source code in any way, but ensures that consistent
      line numbers are preserved through the operation.
      (thanks Albert)

0.000027  Thu Jun 25 07:12:58 2020

    * Tweaked handling of unary prefix operators to correctly 
      identify '++' and '--' as atomic lexemes

    * Added correct parsing of lexical subroutines

0.000028  Sun Jun 28 02:58:01 2020

    * Corrected edge-case behaviour in parsing __END__ and __DATA__
      by adding the (?&PerlOWSOrEND) rule
      (many thanks, Branislav!)

    * Corrected edge-case behaviour in parsing of s/.../.../e constructs

0.001000  Wed Aug  3 00:33:24 2022

    * Improved parsing of modern subroutine signatures
      (Thanks, Juerd!)

    * Now supports all the new syntactic features
      added in Perls v5.28 to v5.36 including:
        - try/catch/finally
        - the isa operator
        - named regex assertions
        - missing lower bounds on regex counted repetitions
        - "spacey" curlies in regexes
        - 0o7777 octal constants
        - Unicode paired delimiters on quotelikes

    * Improved parsing of s/.../{...}e code blocks
      (Thanks, Zaki!)

    * Fixed several edge cases of postfix dereferencing
      (Thanks, Zaki!)

    * The perlop manpage states:
      "Interpolation in patterns has several quirks:
       $|, $(, and $) are not interpolated..."
      PPR now enforces that.
      (Thanks, Zaki!)

    * Also fixed NON-interpolation of variables
      inside qq'...', qr'...', etc.
      (Thanks, Zaki!)

      Solving some of the above issues required deep changes to the mechanism
      of term-matching within the better reflect actual term precedence
      within Perl. This means that the subrules (?&PerlTerm), (?&PerlScalarAccess)
      and (?&PerlArrayAccess) now match differently. Specifically, (?&PerlTerm)
      now matches chains of trailing -> dereferences and/or -> sub/method calls,
      while (?&PerlScalarAccess) and (?&PerlArrayAccess) no longer do so.
      If you were previously using these last two subrules for stand-along matching
      you will need to be more specific:

        # Old behaviour of...         # Now requires...

        / (?&PerlScalarAccess) /x     / (?&PerlScalarAccess) (?&PerlTermPostfixDerefence) /x

        / (?&PerlArrayAccess)  /x     / (?&PerlArrayAccess)  (?&PerlTermPostfixDerefence) /x

0.001001  Wed Aug  3 01:52:51 2022

    * Added try/catch/finally/defer to the list of keywords
      that are never treated as barewords

    * Corrected parsing of try/catch syntax
      (the catch block is not optional!)

    * Updated workarounds for parsing code that uses Try::Tiny and TryCatch
      in line with the above changes

0.001002  Wed Aug  3 02:04:01 2022

    * Rereleasing with ::X and ::Debug variations properly updated

0.001003  Mon Aug  8 04:27:57 2022

    * Improved accuracy of variable-post-dereference detection
      specifically: (?&PerlScalarAccessNoSpace) and (?&PerlArrayAccessNoSpace)
      within interpolating quotelikes
      (Thanks, Zaki!)

0.001004  Mon Aug  8 23:24:09 2022

    * Fixed edge case of 'state' variable declarations
      (Thanks, Zaki!)

0.001005  Tue Sep  6 22:54:34 2022

    * Fixed erroneous non-interpolation of q'...'
      (Thanks, Zaki!)

0.001006  Thu Sep  8 03:50:55 2022

    * Worked around bugs in regex engine that made it impossible
      to interpolate PPR grammars into other regexes in some cases.
      Note that such interpolations still don't work under Perl 5.18
      to 5.28, as the bug was only fixed in 5.30.
      (Thanks, Zaki!)