Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 67323
Status: resolved
Priority: 0/
Queue: POE

People
Owner: Nobody in particular
Requestors: flw [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.287
  • 1.299
Fixed in: (no value)



Sorry for my poor english, let me show it just by code. flw@waker:~/study$ perl -MPOE -le 'print "$POE::VERSION $POE::Kernel::VERSION $POE::Session::VERSION"' 1.299 1.299 1.299 flw@waker:~/study$ ./bug.pl start call bar .... inner bar call bar .... inner bar found bug. call bar .... call bar .... call bar .... flw@waker:~/study$ cat bug.pl #!/usr/bin/perl use strict; use warnings; use POE; create POE::Session( package_states => [ main => [qw( _start foo bar die_on_bug )], ], ); run POE::Kernel(); sub _start{ print "start\n"; $_[KERNEL]->yield( 'foo' ); } exit 0; my $found_bug; sub foo { my $sess = $_[KERNEL]->_resolve_session($_[SESSION]) || ''; if ( $_[SESSION] ne $sess and not $found_bug ){ $found_bug = 1; print "found bug.\n"; $_[KERNEL]->delay( die_on_bug => 3 ); } print "call bar ....\n"; my $ret = $_[KERNEL]->call( $_[SESSION] => bar => 1 ); # bad #$_[KERNEL]->call( $_[SESSION] => bar => 1 ) or 1; # bad too #my @ret = $_[KERNEL]->call( $_[SESSION] => bar => 1 ); # bad too # $_[KERNEL]->call( $_[SESSION] => bar => 1 ); # good $_[KERNEL]->delay( foo => 1 ); } sub bar { print "inner bar\n"; } sub die_on_bug { exit 0; } flw@waker:~/study$
Subject: bug.pl
#!/usr/bin/perl use strict; use warnings; use POE; create POE::Session( package_states => [ main => [qw( _start foo bar die_on_bug )], ], ); run POE::Kernel(); sub _start{ print "start\n"; $_[KERNEL]->yield( 'foo' ); } exit 0; my $found_bug; sub foo { my $sess = $_[KERNEL]->_resolve_session($_[SESSION]) || ''; if ( $_[SESSION] ne $sess and not $found_bug ){ $found_bug = 1; print "found bug.\n"; $_[KERNEL]->delay( die_on_bug => 3 ); } print "call bar ....\n"; my $ret = $_[KERNEL]->call( $_[SESSION] => bar => 1 ); # bad #$_[KERNEL]->call( $_[SESSION] => bar => 1 ) or 1; # bad too #my @ret = $_[KERNEL]->call( $_[SESSION] => bar => 1 ); # bad too # $_[KERNEL]->call( $_[SESSION] => bar => 1 ); # good $_[KERNEL]->delay( foo => 1 ); } sub bar { print "inner bar\n"; } sub die_on_bug { exit 0; }
Sorry, I didn't see this ticket earlier. Thank you for opening the ticket; it makes my job easier! Resolved in https://github.com/rcaputo/poe/commit/8265022983656ed2b31bf010c4726462efc9566e