Merge pull request #224 from salvis/can-on-unblessed-ref

Fix FATAL PLUGIN ERROR [whitelist]:  Can't call method "can"...
This commit is contained in:
Matt Simerson 2015-02-05 17:37:33 -08:00
commit 6687df2b6e

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];