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.
- Re: explicitly declare closures??? Piers Cawley
- Re: explicitly declare closures??? Eric Roode
- Re: explicitly declare closures??? Graham Barr
- Re: explicitly declare closures??? Dave Mitchell
- Re: explicitly declare closures??? John Porter
- Re: explicitly declare closures??? Paul Johnson
- Re: explicitly declare closures??? Dave Mitchell
- Re: explicitly declare closures??? Randal L. Schwartz
- Re: explicitly declare closures??? Paul Johnson
- Re: explicitly declare closures??? Dave Mitchell
- Re: explicitly declare closures??? Dave Mitchell
- Re: explicitly declare closures??? John Porter
- Re: explicitly declare closures??? Dave Mitchell
- RE: explicitly declare closures??? Sterin, Ilya
- Re: explicitly declare closures??? Tony Hall
- Re: explicitly declare closures??? Tony Hall
- Re: explicitly declare closures??? Dave Mitchell
- Re: explicitly declare closures??? Dave Mitchell
- RE: explicitly declare closures??? Garrett Goebel