On Tue, Dec 31, 2002 at 01:03:10PM -0600, Bob Maccione wrote: > my telnet listener will from time to time die and I don't think it should. > > What is the accepted way to wrap a session in an eval so that we can catch > dies?
Matt Cashner has a Session subclass that catches die() and re-throws it as SIGDIE. http://search.cpan.org/author/SUNGO/POE-Exceptions-0.01/lib/POE/Exceptions.pm You can prevent that new signal from killing the session by registering a signal watcher, like so: $kernel->sig( DIE => "event_die" ); The SYNOPSIS is slightly dated. These days the preferred way to handle signals is to call POE::Kernel's sig_handled() method. sub handle_die { $_[KERNEL]->sig_handled(); } -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/
