Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
parser bug handling 'do ($foo)->{bar}' ?by LanX (Saint) |
on Oct 14, 2014 at 13:31 UTC ( [id://1103737]=perlquestion: print w/replies, xml ) | Need Help?? |
LanX has asked for the wisdom of the Perl Monks concerning the following question:
Hi Does it make sense that do ($foo)->{bar} is parsed like do ($foo ->{bar} ) instead of (do $foo )->{bar} or is it rather a bug? Please compare how different eval ($foo)->{bar} gets parsed (see Re^2: B::Deparse weirdness (parser weirdness!) ) I understand that "Only Perl can parse Perl" but I think in order to secure the future of the language we should find ways to fix such inconsistencies. Think about the problems for projects like Perlito or PPI. Maybe more a meditation, hoping for more insights and a productive discussion.
Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :)
updateAre there more built-ins like this? Do they qualify as unary operator (that's the way B::Deparse) tries to handle them.) Isn't the precedence of unop well defined?
Back to
Seekers of Perl Wisdom
|
|