Help for this page

Select Code to Download


  1. or download this
    use Attribute::Handlers;
    use Carp;
    ...
                            $referent->(@_)
                }
    }
    
  2. or download this
    package EventHandlers;
     
    ...
                my $name = *{$symbol}{NAME};
                $EventHandlers{$name} = 1;
    }
    
  3. or download this
    package Annotations;
     
    ...
                my ($this, $name) = @_;
                $Annotations{$this}{$name}
    }
    
  4. or download this
    package Events;
     
    ...
                my ($package, $symbol, $referent, $attr, $data, $phase) = 
    +@_;
                Annotations::Annotate($referent, eventhandler => 1);
    }
    
  5. or download this
    if (my $event = MyEvents->can($CGI->param('event'))) {
                die unless $event->annotation('eventhandler');
                MyEvents->$event();
    }
    
  6. or download this
    $event->{eventhandler}
    
  7. or download this
    annotation($event, 'eventhandler')