From 6792d48c0a0661c4d05f2b5f213df480ba497715 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Wed, 22 Sep 2010 13:59:08 +0200 Subject: [PATCH] Bug 598147: Can't call method "isa" without a package or object reference r/a=mkanat --- email_in.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/email_in.pl b/email_in.pl index 3cfbcfa3b7..fbff450876 100755 --- a/email_in.pl +++ b/email_in.pl @@ -42,6 +42,7 @@ use Email::MIME::Attachment::Stripper; use Getopt::Long qw(:config bundling); use Pod::Usage; use Encode; +use Scalar::Util qw(blessed); use Bugzilla; use Bugzilla::Attachment; @@ -373,7 +374,8 @@ sub die_handler { # In Template-Toolkit, [% RETURN %] is implemented as a call to "die". # But of course, we really don't want to actually *die* just because # the user-error or code-error template ended. So we don't really die. - return if $msg->isa('Template::Exception') && $msg->type eq 'return'; + return if blessed($msg) && $msg->isa('Template::Exception') + && $msg->type eq 'return'; # If this is inside an eval, then we should just act like...we're # in an eval (instead of printing the error and exiting). -- 2.47.2