When the _default events gets triggered it seems blow up.

default caught _child with (create POE::Session=ARRAY(0x872f2dc) 0) at 
../test.pl line 843.
1: POE::Session /home/jasonb/src/poe/poe/blib/lib/POE/Session.pm 598 
HTTPServer::_default 1 0 (undef) (undef) 0 
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2: POE::Kernel /home/jasonb/src/poe/poe/blib/lib/POE/Kernel.pm 991 
POE::Session::_invoke_state 1 0 (undef) (undef) 0 
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
3: POE::Kernel /home/jasonb/src/poe/poe/blib/lib/POE/Kernel.pm 1026 
POE::Kernel::_dispatch_event 1 (undef) (undef) (undef) 0 
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
4: POE::Kernel /home/jasonb/src/poe/poe/blib/lib/POE/Kernel.pm 1406 
POE::Kernel::_dispatch_event 1 (undef) (undef) (undef) 0 
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
.......
Event: trapped error in `?? Kernel.pm:718': Modification of non-creatable 
array value attempted, subscript -1 at ./test.pl line 847.

The code for _default is:

sub _default {
  warn "default caught $_[ARG0] with (@{$_[ARG1]})";
  my $i = 0;
  while (1) {
    my @xyz = map { defined($_) ? $_ : '(undef)' } caller($i++);
    $xyz[-1] = unpack 'B*', $xyz[-1];
    last unless @xyz;
    warn "$i: @xyz\n";
  }
  return 0;
}

It works fine in followtail.perl, but it locks up in my script.  Maybe it's 
because I'm using 'Event'?

Actually, when I CTRL-C followtail.perl I get:

*** spin! ***
default caught _signal with (INT) at followtail.perl line 130.
1: POE::Session /usr/share/perl5/POE/Session.pm 582 main::__ANON__ 1 0 
(undef) (undef) 0 
010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
2: POE::Kernel /usr/share/perl5/POE/Kernel.pm 927 POE::Session::_invoke_state 
1
0 (undef) (undef) 0 
010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
3: POE::Kernel /usr/share/perl5/POE/Kernel.pm 883 
POE::Kernel::_dispatch_state 1 (undef) (undef) (undef) 0 
010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
4: POE::Kernel macro substrate_main_loop (defined in 
/usr/share/perl5/POE/Kernel/Select.pm at line 394) invoked from 
/usr/share/perl5/POE/Kernel.pm 1159 POE::Kernel::_dispatch_state 1 (undef) 
(undef) (undef) 0 
010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
5: main followtail.perl 164 POE::Kernel::run 1 (undef) (undef) (undef) 0 
010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
Use of uninitialized value in unpack at followtail.perl line 134.
Modification of non-creatable array value attempted, subscript -1 at 
followtail.perl line 134.
        (in cleanup) Can't use an undefined value as a symbol reference at 
/usr/share/perl5/POE/Kernel.pm line 2289 during global destruction.

.....

All this is with the latest POE CVS.

Reply via email to