in reply to Re: Re: (Ovid) Re: Sub Definitions Within Subs: Best Way to Exploit
in thread Sub Definitions Within Subs: Best Way to Exploit
Here's a definition of closure from Damian Conway:
"In Perl, a closure is just a subroutine that refers to one or more lexical variables declared outside the subroutine itself" - OO perl, p 56.
I grabbed that quote from a post on the Perl6 list, but I've used that as my standard definition of closure ever since the book came out. It's really the only one I've seen that makes sense.
Note that merlyn also agrees with me, as shown here in this post to the mod_perl list.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Definition of a Closure
by htoug (Deacon) on Oct 12, 2001 at 12:33 UTC |