On Fri, Aug 17, 2012 at 08:00:25PM -0500, Jesse Luehrs wrote: > > I like the concept, but "when ({ ... })" reads kind of weird. Everywhere > else in the language, ({ ... }) means a hashref - anything that means a > block has some kind of leading keyword inside any potential parentheses: > "(do { ... })", "(sub { ... })", etc. I think just leaving it as > "when (sub { ... })" is probably going to be the least confusing. Maybe that ought to be fixed ;-). After reading your statement, I tried: $ perl -wE 'sub foo (&) {say $_ [0] -> ()} foo ({1})' Type of arg 1 to main::foo must be block or sub {} (not anonymous hash ({})) at -e line 1, near "}) " Execution of -e aborted due to compilation errors. $ I was surprised the parens are not allowed in this case. AbigailThread Previous | Thread Next