Subject: | PPI does not honor canonical way to force curlys to be interpreted as a hash constructor |
PPI does not honor the canonical way to force curly brackets to be
interpreted as a hash constructor, as documented in perlref; that is, to
add a unary '+' in front of the left curly.
There is also no explicit code to honor the canonical way to force
curlys to be treated as a block (a semicolon after the left curly (i.e.
a null statement), same source), though in practice I have been unable
to come up with valid Perl beginning with '{;' that PPI calls a
constructor. Invalid Perl is another matter.
SVN revision 8963 addresses both the unary-plus omission, and the
null-statement nit. In the case of the nit, I was unable to resist the
temptation to collapse the look-ahead class determination into an array
of hashes, similarly to the way some of the look-behind determination is
collapsed into a hash. If this is not what you would prefer, please let
me know and I will put that part of the code back the way it was.
Thanks for an awesome module, and for your time and attention.
Tom Wyant