From 8809fceb4ae4728ee4a98e49d3fa7c69f8f9e2da Mon Sep 17 00:00:00 2001 From: Hanno Hecker Date: Tue, 31 Jul 2007 06:37:45 +0000 Subject: [PATCH] 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 --- lib/Qpsmtpd.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index e6a7442..e4c4a77 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -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"}; } }