X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI.pm;h=9cc4d512426310e48b15f048722834ac34f7b160;hb=9ba3b5ba7379ac06399d7b296e7796b65fad6149;hp=34646b81489e4ae8c4f0e5c2a54dfe55ea7b3a0a;hpb=07309ad3fbc3f3d29b0da8921716392b8e593eb0;p=debbugs.git diff --git a/Debbugs/CGI.pm b/Debbugs/CGI.pm index 34646b8..9cc4d51 100644 --- a/Debbugs/CGI.pm +++ b/Debbugs/CGI.pm @@ -34,7 +34,7 @@ None known. use warnings; use strict; use vars qw($VERSION $DEBUG %EXPORT_TAGS @EXPORT_OK @EXPORT); -use base qw(Exporter); +use Exporter qw(import); use Debbugs::URI; use HTML::Entities; @@ -292,7 +292,9 @@ sub cgi_parameters { sub quitcgi { - my $msg = shift; + my ($msg, $status) = @_; + $status //= '500 Internal Server Error'; + print "Status: $status\n"; print "Content-Type: text/html\n\n"; print fill_in_template(template=>'cgi/quit', variables => {msg => $msg} @@ -622,10 +624,6 @@ sub htmlize_maintlinks { return htmlize_addresslinks($prefixfunc, \&mainturl, $maints); } - -our $_maintainer; -our $_maintainer_rev; - =head2 bug_linklist bug_linklist($separator,$class,@bugs) @@ -841,7 +839,6 @@ sub option_form{ for my $key (keys %{$param{form_option}}) { # strip out leader; shouldn't be anything here without one, # but skip stupid things anyway - my $o_key = $key; next unless $key =~ s/^\Q$form_option_leader\E//; if ($key =~ /^add_(.+)$/) { # this causes a specific parameter to be added @@ -959,7 +956,7 @@ sub calculate_etags { ); my @additional_data = @{$param{additional_data}}; for my $file (@{$param{files}}) { - my $st = stat($file) or warn "Unable to stat $file:: $!"; + my $st = stat($file) or warn "Unable to stat $file: $!"; push @additional_data,$st->mtime; push @additional_data,$st->size; }