Better error message than

Can't locate object method "new" via package "Qpsmtpd::Plugin::logging::warn"
 (perhaps you forgot to load "Qpsmtpd::Plugin::logging::warn"?)
if plugin cannot be found in @plugin_dirs


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@762 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Hanno Hecker 2007-07-31 06:37:45 +00:00
parent 86c0d8d95e
commit 8809fceb4a

View File

@ -320,6 +320,9 @@ sub _load_plugin {
last PLUGIN_DIR;
}
}
die "Plugin $plugin_name not found in our plugin dirs (",
join(", ", @plugin_dirs),")"
unless defined &{"${package}::plugin_name"};
}
}