PPI 1.219_001 - please test - breaking ->prototype changes and parse improvements

I took some time today to prepare a number of pull requests by MOREGAN for release, and the tarball for 1.219_001 is now on CPAN. Please test it and let me know if you run into problems with your module. Most of the changes simply improve parsing, but the ->prototype changes might break things if you relied on the previously broken behavior.

If no problems crop up, this will be released as 1.220 on tuesday, 2014-11-11.

I am not picky about which way it is sent to me, but feedback is best provided here: Github Issue #92

The changes in this release are:


  • incompatible behavior fixes on PPI::Statement::Sub->prototype
  • improved parsing of various syntax elements
  • code quality improvements


  • {} is now recognized as anonymous hash constructor instead of a code block after these operators: &&= //= || && // ? : (GitHub #36) (MOREGAN)
  • regex capture variables greater than $9 are now parsed completely, instead of being parsed as single digit captures with numbers after them (GitHub #38) (MOREGAN)
  • DESTROY and AUTOLOAD subs are now parsed even without the sub keyword (GitHub #39) (MOREGAN)
  • PPI::Statement::Sub->prototype behavior now matches its documentation, instead of returning the prototype string unchanged and still including the parens (GitHub #56) (MOREGAN)
  • PPI::Statement::Sub->prototype now returns undef on subs without a prototype, instead of returning an empty string (GitHub #56) (MOREGAN)
  • list of keywords which are not parsed as packages when followed by the Perl4 package separator ' has been increased (GitHub #77) (MOREGAN)
  • application of a number of Perl::Critic policies and documentation fixes (GitHub #53) (MOREGAN, MITHALDU)
  • automation of README.md generation for git (GitHub #86) (COWENS)


My current beef with PPI is that the documentation for rewriting source is obtuse and difficult to find. I'd like to talk to someone about this so that I can fix it. Is there a PPI irc channel or somewhere else to find like minded people with an interest in PPI?

Leave a comment

About Mithaldu

user-pic Not writing much, but often found pawing at CPAN with other #perl-cats