Help for this page

Select Code to Download


  1. or download this
    my @callbacks = (
       &some_handler,
    ...
    );
    
    my $rv = $callbacks[$event]->($arg0, $arg1);
    
  2. or download this
    my $rv;
    given ($event) {
    ...
       when FOO_EVENT     { $rv = foo_handler    ($arg0, $arg1); }
       when BAR_EVENT     { $rv = bar_handler    ($arg0, $arg1); }
    };
    
  3. or download this
    foreach (@procs) {
       $_->();
    }