On Sat, 2003-08-23 at 19:22, Rocco Caputo wrote: > On Sat, Aug 23, 2003 at 04:04:26PM -0400, Dan McCormick wrote: > > (Which raises the question: has there been talk of a synchronous > > "$session->callback()"?) > > Not until today. :) If you look at the postback() code in POE::Session, > it should be straightforward to build a callback() version. Copy, > paste, s/post/call/ throughout the new sub. > > Test it against Net::OSCAR, and submit a patch if it works. A > documentation patch would also be appreciated.
'Kay, I whipped it up and it seems to be working. I wasn't sure what to do with the various auxiliary bits, though. Would you like me to create a CALLBACK_RETVAL, POE::Session::Callback::DESTROY method, and %callback_parent_id hash, and call refcount_increment with a 'callback' identifier, or just use the the postback versions of those? Of course, since it's synchronous, I'm pretty sure inc'ing and dec'ing the refcounts shouldn't matter, so I could also just take those bits out. Dan
