[perl #119973] Treat initial { in format args as block
authorFather Chrysostomos <sprout@cpan.org>
Sun, 19 Jan 2014 01:58:52 +0000 (17:58 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 19 Jan 2014 03:11:58 +0000 (19:11 -0800)
commitf60e676307b23b6eadcbba505b4f71838fe212a2
tree53802011237911a3c8efcba983e00d41ae4c6948
parentb7de36ba19538a56af20cf3c27642b77db584701
[perl #119973] Treat initial { in format args as block

Commit 705fe0e5f8a inadvertently caused the hash-vs-block disambigua-
tion to apply at the beginning of a format argument line.  This commit
restores the implicit ‘do’, but only when the opening brace is the
first token on that line, not embedded within an expression.

In other words, this now has a block as before:

format =
{ foo => "bar" }
.

but this still produces a hash (in 5.16 it was a block):

format =
+{ foo => "bar }
.
t/op/write.t
toke.c