- or download this
#!/usr/bin/perl -w
use strict;
...
#_stop => \&handler_stop,
}
);
- or download this
$poe_kernel->run();
exit;
- or download this
sub handler_start {
my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION];
...
# ask for the prompt event to get run next
$kernel->yield('prompt');
}
- or download this
sub handler_prompt {
my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION];
...
# this will make the timeout event fire in 10 seconds
$kernel->delay('timeout',10);
}
- or download this
sub handler_timeout {
my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION];
...
# queue is empty resulting in shutdown
$heap->{wheel}=undef;
}
- or download this
sub handler_gotLine {
my ($kernel, $heap, $session, $arg, $exception) =
...
# new prompt
$kernel->yield('prompt');
}