http://qs321.pair.com?node_id=539457


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