Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
            #_stop     => \&handler_stop,
          }
      );
    
  2. or download this
    $poe_kernel->run();
    exit;
    
  3. 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');
    }
    
  4. 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);
    }
    
  5. or download this
    sub handler_timeout {
      my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION];
    ...
      # queue is empty resulting in shutdown
      $heap->{wheel}=undef;
    }
    
  6. or download this
    sub handler_gotLine {
      my ($kernel, $heap, $session, $arg, $exception) = 
    ...
      # new prompt
      $kernel->yield('prompt');
    }