The documentation is likely at fault here. Please send a note to bug-
[EMAIL PROTECTED], and I'll fix it while I'm rewriting the docs for 1.0.
--
Rocco Caputo - [EMAIL PROTECTED]
On Oct 5, 2007, at 11:06, Martin Evans wrote:
Hi all,
Just looking at POE for the first time and trying a few things out
to get to know it. One of the items on my list was error handling
so I was naturally interested in the DIE signal. I have:
$_[KERNEL]->sig( 'DIE', 'signal' );
in my _start handler and a 'signal' event with handler. When I use
Perl's die method in another handler the signal handler is called
but arg0 is 'DIE' and arg1 is a hash ref as discussed:
http://search.cpan.org/~rcaputo/POE-0.9999/lib/POE/
Session.pm#Exceptions
The pod seems to suggest only a single argument is passed to a
signal handler but I appear to be getting 2 as evidenced by:
print "Signal $_[STATE] $_[ARG0]\n";
my $data = $_[ARG1];
print "\tfile=$data->{file}, line=$data->{line}, event=$data->
{event}, from_state=$data->{from_state}, error_str=$data->
{error_str}\n";
in my signal handler which prints:
Signal signal DIE
file=single.pl, line=50, event=count, from_state=count,
error_str=fred at single.pl line 52.
Is the documentation out of date?
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com