Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: regarding 1.02 (was Re: IO::Lambda: call for participation)

by zby (Vicar)
on Jan 14, 2009 at 08:21 UTC ( [id://736154]=note: print w/replies, xml ) Need Help??


in reply to Re^2: regarding 1.02 (was Re: IO::Lambda: call for participation)
in thread IO::Lambda: call for participation

One thing that is still not entirely clear here is how the $socket parameter gets passed aroud - or rather: why it needs to be passed in two ways - as a shared variable in the closure and via context? Actually - maybe I know the answer - this is because the "conditions" read from the context.
  • Comment on Re^3: regarding 1.02 (was Re: IO::Lambda: call for participation)

Replies are listed 'Best First'.
Re^4: regarding 1.02 (was Re: IO::Lambda: call for participation)
by tilly (Archbishop) on Jan 14, 2009 at 11:57 UTC
    It needs to be passed in the context because the dispatch engine needs to know about $socket so it knows when to dispatch to the closure. $socket also needs to be available in the closure, so the easiest way to do that is to make it part of the closure. However if you want the context is also available in @_. It just takes more work to get it from there.

Log In?
Username:
Password:

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

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

    No recent polls found