Paul Johnson <[EMAIL PROTECTED]> wrote:
> Try changing your original example from
> 
>   sub foo {
> 
> to
> 
>   *foo = sub {
> 
> and you'll see that everything works "as expected".

add a BEGIN so that instantion happens at the same time that a named
sub would be:

BEGIN { * foo = sub { ....} }

and the problem comes back ;-)

Anyway, coming back to my original suggestion:

I think closures are a lot harder (or at least subtler) than people
think, and explicit declarations might help. There again, they might not.

Ah well....

Dave M.

Reply via email to