Changeset 14994 for lang/perl/App-MadEye

Show
Ignore:
Timestamp:
07/01/08 18:13:21 (5 months ago)
Author:
tokuhirom
Message:

apply rule to notify plugins.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/App-MadEye/trunk/lib/App/MadEye.pm

    r8250 r14994  
    4343 
    4444    if (%{$self->{results}}) { 
    45         $self->run_hook('notify' => $self->{results}); 
     45        for my $obj ( @{ $self->class_component_hooks->{notify} } ) { 
     46            my ( $plugin, $method ) = ( $obj->{plugin}, $obj->{method} ); 
     47            if ($self->_should_run( plugin => $plugin )) { 
     48                $self->run_hook('notify' => $self->{results}); 
     49            } 
     50        } 
    4651    } 
    4752 
     
    7378        @_ => +{ 
    7479            plugin => 1, 
    75             target => 1, 
     80            target => 0, 
    7681        } 
    7782    ); 
     
    8489                $self, 
    8590                +{ 
    86                     target => $args->{target}, 
    8791                    plugin => $args->{plugin}, 
     92                    ($args->{target} ? ( target => $args->{target}) : () ), 
    8893                } 
    8994            ); 
     
    9398    return 1; 
    9499} 
     100*_should_run = *_should_add_result; 
    95101 
    96102sub _load_rule {