perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foo Ji-Haw" <jh...@nexlabs.com>
Subject Re: [OT] Re: a new mod_perl problem
Date Wed, 19 Oct 2005 01:55:16 GMT
I don't think closure is something that is something to avoid. When used
wisely (and perhaps with a bit of experience) it can be rather useful. I
have not used it myself, but I see the potential for it.

Thanks for the enlightenment Perrin.

----- Original Message ----- 
From: "John ORourke" <john-modperl@o-rourke.org>
To: "Perrin Harkins" <perrin@elem.com>
Cc: "angel flower" <angelflowerer@msn.com>; <modperl@perl.apache.org>
Sent: Tuesday, October 18, 2005 11:33 PM
Subject: Re: [OT] Re: a new mod_perl problem


> Perrin Harkins wrote:
>
> >
> >Good guess, but that's not what is happening here.  What our flowery
> >friend has stumbled onto is a closure.  When a subroutine references a
> >"my" variable that was declared outside of that subroutine's scope, the
> >sub will keep a private copy of that variable.  If it wasn't a closure,
> >
> >
>
> Ah, missed that bit in Perl 101... sounds like something to avoid
> anyway, thanks!
>
> John


Mime
View raw message