develooper Front page | perl.perl5.porters | Postings from February 2003

Re: [PATCH] jumbo closure fix

Thread Previous
Gurusamy Sarathy
February 26, 2003 15:16
Re: [PATCH] jumbo closure fix
Message ID:
On Wed, 26 Feb 2003 21:29:47 GMT, Dave Mitchell wrote:
>On Wed, Feb 26, 2003 at 01:13:12PM -0800, Gurusamy Sarathy wrote:
>> On Wed, 26 Feb 2003 20:39:37 GMT, Dave Mitchell wrote:
>> >> IMO, the original warnings are rather misguided, because they
>> >> ass_u_me a particular intent which may not be (in fact most
>> >> often isn't, given that most people aren't trying to do anything
>> >> fancy with closures) true.  It may be better to let these
>> >> variables resolve as normal and let "use strict" do its thing.
>> >
>> >What is the thing that you want 'use strict' to do?
>> Nothing it doesn't do already, i.e. fail with "Global symbol $x
>> requires explicit package name ...".
>You've lost me here a bit, I'm afraid. The kind of code that generates the
>closure warnings doesn't generate such 'global sym' messages under use
>strict, eg

I was talking about the case where there is an eval "sub { ... }"
where the body of the sub references lexicals in the outer scope.

I remember cases where such constructs used to trigger these warnings,
but I can't seem to reproduce that anymore.  Which means I'm probably
going senile, and it may be safest to ignore me.


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