From 8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 23 Dec 2015 20:46:43 +0100 Subject: Bug 1201113: Support to run Bugzilla as a PSGI application r=dylan --- Bugzilla/Error.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Error.pm') diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm index e730022db..ee40ccf8b 100644 --- a/Bugzilla/Error.pm +++ b/Bugzilla/Error.pm @@ -28,8 +28,9 @@ use Date::Format; sub _in_eval { my $in_eval = 0; for (my $stack = 1; my $sub = (caller($stack))[3]; $stack++) { - last if $sub =~ /^ModPerl/; - $in_eval = 1 if $sub =~ /^\(eval\)/; + last if $sub =~ /^(?:ModPerl|Plack|CGI::Compile)/; + # An eval followed by CGI::Compile is not a "real" eval. + $in_eval = 1 if $sub =~ /^\(eval\)/ && (caller($stack + 1))[3] !~ /^CGI::Compile/; } return $in_eval; } -- cgit v1.2.3-24-g4f1b