On Sat, Jul 10, 2004 at 04:35:35AM +0400, Alexey Trofimenko wrote: : On Fri, 9 Jul 2004 20:14:32 -0400, Joe Gottman <[EMAIL PROTECTED]> : wrote: : > Will given be a statement modifier also? This would be useful for : >quick : >topicalization: : > : > say "$_ => %hash{$_}" given get_random_key(); : > : >Joe Gottman : > : > : hm... : does perl5ish : : say "$_ => %hash{$_}" for get_random_key(); : : become unusable suddenly?
Those are both okay. We can probably even make them implicitly declare a lexical $_ for the statement, as if the left side were really a -> $_ { ... } or some such, only without the braces. Topicalizers have to behave like people expect. It's the explicit declarations in a statement modifier that I think are completely misleading, and should probably be disallowed, or at least discouraged. The alternative is to complicate what "my" means, and I don't really want to do that when we just went to a lot of trouble to simplify it from Perl 5's rules. Larry