Syntactic Confectionery Delight | |
PerlMonks |
Re: calling from outside the closure a sub defined in a closureby Anno (Deacon) |
on Sep 19, 2007 at 09:48 UTC ( [id://639847]=note: print w/replies, xml ) | Need Help?? |
Your code doesn't show a closure, just a bare block that defines a coderef (which might itself be a closure) in its lexical scope. If you want to access that outside the block, you must find a way to pass the coderef outside. A sub could return it, probably among other things.
This looks like a somewhat convoluted design. Anno
In Section
Seekers of Perl Wisdom
|
|