Re: "delay" from object method not working as expected
[email protected] ("John R.") Thu, 08 Jul 2010 20:16:45 -0500
| Newsgroups | perl.poe |
|---|---|
| Message-ID | <[email protected]> |
On 07/07/10 16:52, John R. wrote:
> I have an object method in which I want to send two events one after
> another.
I don't recall why I didn't utilize a POE event for this. I changed the
object method to an event and it works as expected.
sub scope {
my ( $kernel, $self ) = @_[ KERNEL, OBJECT ];
Logger->log({level => 'info',
message => "radio told to enter bandscope"});
$kernel->post( $self->{alias}, 'radio_cmd', 'AM' );
$kernel->delay( 'radio_cmd' => 3, 'DS' );
$self->{mode} = 'scope';
$kernel->post( $self->{caller}, 'scoping' => $self->{alias} );
#print Dumper($poe_kernel->get_active_session());
}