Fix Qpsmtpd::Plugins::isa_plugin() with multiple plugin dirs (Gavin Carr)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@783 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
610672cb5f
commit
a5c22bcb7c
@ -117,9 +117,19 @@ sub isa_plugin {
|
||||
# don't reload plugins if they are already loaded
|
||||
return if defined &{"${newPackage}::plugin_name"};
|
||||
|
||||
# find $parent in plugin_dirs
|
||||
my $parent_dir;
|
||||
for ($self->qp->plugin_dirs) {
|
||||
if (-e "$_/$parent") {
|
||||
$parent_dir = $_;
|
||||
last;
|
||||
}
|
||||
}
|
||||
die "cannot find plugin '$parent'" unless $parent_dir;
|
||||
|
||||
$self->compile($self->plugin_name . "_isa_$cleanParent",
|
||||
$newPackage,
|
||||
"plugins/$parent"); # assumes Cwd is qpsmtpd root
|
||||
"$parent_dir/$parent");
|
||||
warn "---- $newPackage\n";
|
||||
no strict 'refs';
|
||||
push @{"${currentPackage}::ISA"}, $newPackage;
|
||||
|
Loading…
Reference in New Issue
Block a user