Fix FATAL PLUGIN ERROR [whitelist]: Can't call method "can" on unblessed reference at lib/Qpsmtpd/Config.pm line 38, <STDIN> line 1.

This commit is contained in:
Hans Salvisberg 2015-02-06 00:27:41 +01:00
parent 17d0c42d58
commit 17c35c385d

View File

@ -34,7 +34,7 @@ sub config {
# first run the user_config hooks # first run the user_config hooks
my ($rc, @config); my ($rc, @config);
if (ref $type && $type->can('address')) { if (ref $type && UNIVERSAL::can($type, 'address')) {
($rc, @config) = $qp->run_hooks_no_respond('user_config', $type, $c); ($rc, @config) = $qp->run_hooks_no_respond('user_config', $type, $c);
if (defined $rc && $rc == OK) { if (defined $rc && $rc == OK) {
return wantarray ? @config : $config[0]; return wantarray ? @config : $config[0];