On Wednesday, August 20, 2003, at 04:31 am, Kurt Starsinic wrote: > So it seems to me that, in Perl, a named subroutine is never a > closure, and an anonymous subroutine is always a closure. The fact > that perl optimizes the special case of an anonymous subroutine with 0 > private bindings is an implementation detail of interest to a tiny few. > This behavior is not guaranteed, and based on Simon's bug, I suspect > that it will change. I would say an anonymous subroutine is just that, an anonymous subroutine. It needs outside lexicals to be a closure. However, I also think this issue is totally irrelevant since only a select few are evil enough to do anything about it, and it is trivial to have a wrapper object around it. Slowing down all anonymous subroutines is just silly. Just document it, close the bug and get on with life. ArthurThread Previous | Thread Next