Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to best pass on the context / wantarray?

by nothingmuch (Priest)
on Mar 27, 2006 at 14:48 UTC ( #539457=note: print w/ replies, xml ) Need Help??


in reply to How to best pass on the context / wantarray?

Update: err, crap... gotta learn to read before posting. It's still nice spam though ;-)

I am going to release Context::Handle pretty soon but Want needs to be updated.

It looks like this:

use Context::Handle; sub wrapper { my $rv = context_sensitive { call_something_else() }; # do anything here $rv->return; }

Update: I'm not sure what Anonymous Monk meant, but If said monk is implying this module is useless then said monk should learn to read. The module propagates context opaquely, such that the wrapping sub doesn't need to care about wantarray/Want at all, and evaluates the sub call in the correct context without too much PITA.

-nuffin
zz zZ Z Z #!perl


Comment on Re: How to best pass on the context / wantarray?
Download Code
Re^2: How to best pass on the context / wantarray?
by Anonymous Monk on Mar 27, 2006 at 15:38 UTC

    YAPCPM! pointless can presence module.

      what?

      -nuffin
      zz zZ Z Z #!perl

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2014-07-29 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (217 votes), past polls