in reply to parser bug handling 'do ($foo)->{bar}' ?
I guess this comes from the fact that do is also used for flow control, which means it doesn't fall under the "Looks like a function" rule. print "Hello" if(0) || 1; prints "Hello", because if is not a function.
This behaviour is actually documented for last and its kind:
It is also exempt from the looks-like-a-function rule, so last ("foo")."bar" will cause "bar" to be part of the argument to last.Maybe the documentation for do should mention the same thing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: parser bug handling 'do ($foo)->{bar}' ?
by LanX (Saint) on Oct 14, 2014 at 14:12 UTC | |
by Eily (Monsignor) on Oct 14, 2014 at 14:54 UTC | |
by LanX (Saint) on Oct 14, 2014 at 15:00 UTC | |
by LanX (Saint) on Oct 14, 2014 at 15:34 UTC | |
by Eily (Monsignor) on Oct 14, 2014 at 15:56 UTC | |
by LanX (Saint) on Oct 14, 2014 at 16:30 UTC | |
|