develooper Front page | perl.perl5.porters | Postings from June 2015

Re: for 5.24: the lexical topic

Thread Previous
June 2, 2015 10:27
Re: for 5.24: the lexical topic
Message ID:
Ricardo Signes wrote:
>Do we have any ways forward on the design, or anything to do other than remove
>this behavior?

I think there's no way forward that looks at all similar to what we have.
Any lexical topic variable would at least have to be selected on a
per-construct basis: you can't have "my $_" causing grep and the like to
use a lexical topic.  A spearate "grep_lexical" operator should be fine,
but if we go that route we should consider forcing the lexical topic
variable to have a name other than "$_" to avoid the confusing shadowing.
Actual "my $_" should be no more valid than "my @_".


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About