in reply to closure clarity, please
Why don't the docs mention that a named sub can create a closure?
There's a whole section on it called "Persistent variables with closures".
Could someone give a blow by blow description of what's happening?
In short, named subs capture at compile time.
You seem to believe that subs are scoped to the block that contain them. That's not true. Subs are global.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: closure clarity, please
by 7stud (Deacon) on Nov 24, 2009 at 22:42 UTC | |
by ikegami (Patriarch) on Nov 24, 2009 at 23:17 UTC | |
by JadeNB (Chaplain) on Nov 25, 2009 at 06:58 UTC | |
|
Re^2: closure clarity, please
by 7stud (Deacon) on Nov 26, 2009 at 17:01 UTC |