X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI.pm;h=9cc4d512426310e48b15f048722834ac34f7b160;hb=1a1fa6f0af2be9d4076d9aad5f5a84c5fb3d9a8a;hp=e4681bde6018a839dda3d626a874701b12f2b215;hpb=bb118960f74006337f91658927c328e1542c9fac;p=debbugs.git diff --git a/Debbugs/CGI.pm b/Debbugs/CGI.pm index e4681bd..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 = File::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; }