~ubuntu-branches/ubuntu/utopic/spamassassin/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/Mail/SpamAssassin/PluginHandler.pm

  • Committer: Bazaar Package Importer
  • Author(s): Noah Meyerhans
  • Date: 2010-01-26 22:53:12 UTC
  • mfrom: (1.1.13 upstream) (5.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100126225312-wkftb10idc1kz2aq
Tags: 3.3.0-1
* New upstream version.
* Switch to dpkg-source 3.0 (quilt) format

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
use strict;
32
32
use warnings;
33
33
use bytes;
 
34
use re 'taint';
34
35
use File::Spec;
35
36
 
36
37
use vars qw{
159
160
    # nope.  run through all registered plugins and see which ones
160
161
    # implement this type of callback.  sort by priority
161
162
 
162
 
    my %subsbypri = ();
 
163
    my %subsbypri;
163
164
    foreach my $plugin (@{$self->{plugins}}) {
164
165
      my $methodref = $plugin->can ($subname);
165
166
      if (defined $methodref) {
172
173
      }
173
174
    }
174
175
 
175
 
    my @subs = ();
 
176
    my @subs;
176
177
    foreach my $pri (sort { $a <=> $b } keys %subsbypri) {
177
178
      push @subs, @{$subsbypri{$pri}};
178
179
    }
200
201
 
201
202
    eval {
202
203
      $ret = &$methodref ($plugin, @_);
 
204
      1;
 
205
    } or do {
 
206
      my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
 
207
      warn "plugin: eval failed: $eval_stat\n";
203
208
    };
204
 
    if ($@) {
205
 
      warn "plugin: eval failed: $@";
206
 
    }
207
209
 
208
210
    if ($ret) {
209
211
      #dbg("plugin: ${plugin}->${methodref} => $ret");