Lines 66-73
sub call {
Link Here
|
66 |
if (C4::Context->config('enable_plugins')) { |
66 |
if (C4::Context->config('enable_plugins')) { |
67 |
my @plugins = $class->new({ enable_plugins => 1 })->GetPlugins({ method => $method }); |
67 |
my @plugins = $class->new({ enable_plugins => 1 })->GetPlugins({ method => $method }); |
68 |
my @responses; |
68 |
my @responses; |
|
|
69 |
@plugins = grep { $_->can($method) } @plugins; |
69 |
foreach my $plugin (@plugins) { |
70 |
foreach my $plugin (@plugins) { |
70 |
my $response = $plugin->$method(@args); |
71 |
my $response = eval { $plugin->$method(@args) }; |
|
|
72 |
if ($@) { |
73 |
warn sprintf("Plugin error (%s): %s", $plugin->get_metadata->{name}, $@); |
74 |
next; |
75 |
} |
76 |
|
71 |
push @responses, $response; |
77 |
push @responses, $response; |
72 |
} |
78 |
} |
73 |
|
79 |
|
74 |
- |
|
|