summaryrefslogtreecommitdiffstats
path: root/Bugzilla/PSGI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/PSGI.pm')
-rw-r--r--Bugzilla/PSGI.pm38
1 files changed, 18 insertions, 20 deletions
diff --git a/Bugzilla/PSGI.pm b/Bugzilla/PSGI.pm
index 46352b319..e95b5291b 100644
--- a/Bugzilla/PSGI.pm
+++ b/Bugzilla/PSGI.pm
@@ -16,27 +16,25 @@ use Bugzilla::Logging;
our @EXPORT_OK = qw(compile_cgi);
sub compile_cgi {
- my ($script) = @_;
- require CGI::Compile;
- require CGI::Emulate::PSGI;
+ my ($script) = @_;
+ require CGI::Compile;
+ require CGI::Emulate::PSGI;
- my $cgi = CGI::Compile->compile($script);
- my $app = CGI::Emulate::PSGI->handler(
- sub {
- Bugzilla::init_page();
- $cgi->();
- }
- );
- return sub {
- my $env = shift;
- if ($env->{'psgix.cleanup'}) {
- push @{ $env->{'psgix.cleanup.handler'} }, \&Bugzilla::_cleanup;
- }
- my $res = $app->($env);
- Bugzilla::_cleanup() if not $env->{'psgix.cleanup'};
- return $res;
- };
+ my $cgi = CGI::Compile->compile($script);
+ my $app = CGI::Emulate::PSGI->handler(sub {
+ Bugzilla::init_page();
+ $cgi->();
+ });
+ return sub {
+ my $env = shift;
+ if ($env->{'psgix.cleanup'}) {
+ push @{$env->{'psgix.cleanup.handler'}}, \&Bugzilla::_cleanup;
+ }
+ my $res = $app->($env);
+ Bugzilla::_cleanup() if not $env->{'psgix.cleanup'};
+ return $res;
+ };
}
-1; \ No newline at end of file
+1;