On 5/28/05, Michael Graham <[EMAIL PROTECTED]> wrote: > I've made a new version which filters out duplicate callbacks:
Somewhere along the line did we loose the ability to register a callback to the object? In the latest patch, it looks like a call to $self->add_callback(...) will end up registering the callback in ref($self) (or in otherwords, the class, not the object). This means you will not be able to register a one time callback in a persistent environment. Here is an example where that might be useful. Say you have a long running task that needs to be accomplished and you do not want the user to wait for a response. To solve this problem, in your runmode you register a callback at the teardown stage, and you do the work in that callback. The teardown stage runs after the HTML has been sent to the browser, so your callback can take as long as it wants without making the user wait (you could accomplish the same thing using a fork of course). If running under mod_perl, the next request will also run the teardown callback that was registered during the previous request. I think this type of one time callback should be supported. Cheers, Cees --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
