summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Error.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-12-23 20:46:43 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2015-12-23 20:46:43 +0100
commit8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0 (patch)
tree74808e169701195ce18498f4de6dcf35778464a6 /Bugzilla/Error.pm
parentc94abb0445d015c1bffcd7207eac6fd9a3a8371b (diff)
downloadbugzilla-8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0.tar.gz
bugzilla-8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0.tar.xz
Bug 1201113: Support to run Bugzilla as a PSGI application
r=dylan
Diffstat (limited to 'Bugzilla/Error.pm')
-rw-r--r--Bugzilla/Error.pm5
1 files changed, 3 insertions, 2 deletions
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;
}