Hi,
I'd like to use POE::Exceptions in my project.
They don't seem to be working for me.
I run the example given in the POD (tweaked slightly):

use POE::Exceptions;

POE::Session::Exception->create(
  inline_states => {
    _start => sub { print "START\n";
        $_[KERNEL]->sig('DIE','death_handled');
    },
    death_handled => sub { 
      print "EXCEPTION CAUGHT\n";
      $_[KERNEL]->sig_handled();
    },
    _stop => sub { print "END\n"; },
  }
);

$poe_kernel->run();

It runs, catches the exceptions, but then just hangs.
The script won't respond to SIGINT or SIGQUIT - a SIGKILL does the trick.
Its POE 0.27, running on 5.8.0 on RedHat Enterprise AS 3.

Despite being a POE noob, I had a look at the code, it seems relatively
elegant/minimal/simple, leading me to believe the problem is something quite
subtle with how the POE::Exceptions code interacts with the Kernel or
Sessions.

Has anyone else found this problem? Is there something I have missed? Is there
a better more elegant way of approaching the problems exceptions solve?

thanks!
Lachlan

Reply via email to