diff options
Diffstat (limited to 'Bugzilla/Error.pm')
-rw-r--r-- | Bugzilla/Error.pm | 5 |
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; } |