Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: calling from outside the closure a sub defined in a closure

by Anno (Deacon)
on Sep 19, 2007 at 09:48 UTC ( [id://639847]=note: print w/replies, xml ) Need Help??


in reply to calling from outside the closure a sub defined in a closure

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

  • Comment on Re: calling from outside the closure a sub defined in a closure

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://639847]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found