aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-06-02 22:51:56 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-06-02 23:04:56 -0400
commit2cf52df0d8e94232c9e41c3effac6a5a4b5953c8 (patch)
tree9caaf991df55d34342acb27b8a169fd2b4fdd0de
parent820d2b391bad35b525ee0d7b3af5a24a465ca956 (diff)
realized i use strict
-rw-r--r--minimun.spec2
-rw-r--r--orig/minimun12
2 files changed, 7 insertions, 7 deletions
diff --git a/minimun.spec b/minimun.spec
index b5b12b7..6b6bc1c 100644
--- a/minimun.spec
+++ b/minimun.spec
@@ -1,7 +1,7 @@
Summary: A perl cgi/pdfTeX script for doc generation
Name: minimun
Version: 1.0
-Release: 3
+Release: 4
License: GPL, Unknown
Source: https://hrhr.dev/src/minimun.tar.gz
URL: https://git.hrhr.dev/minimun/about
diff --git a/orig/minimun b/orig/minimun
index f6f9407..d4e2b7d 100644
--- a/orig/minimun
+++ b/orig/minimun
@@ -7,14 +7,14 @@ use File::Copy;
chdir('/tmp');
-$buffer, %FORM;
+my($buffer, %FORM);
if ($ENV{'REQUEST_METHOD'} eq "GET") {
$buffer = $ENV{'QUERY_STRING'};
}
-@pairs = split(/&/, $buffer);
+my @pairs = split(/&/, $buffer);
-foreach $pair (@pairs) {
+foreach my $pair (@pairs) {
my ($name, $val) = split(/=/, $pair);
$val =~ tr/+/ /;
$val =~ s/%(..)/pack("C", hex($1))/eg;
@@ -22,7 +22,7 @@ foreach $pair (@pairs) {
$FORM{$name} = $val;
}
-($fh, $filename) = tempfile(UNLINK => 1);
+my ($fh, $filename) = tempfile(UNLINK => 1);
copy("%%DEST%%/format.tex",$fh);
print $fh "\n";
@@ -43,12 +43,12 @@ else{
say $fh "\\bye";
system ('/usr/bin/pdftex', $filename);
-open(DOC, '<', "$filename.pdf") or {
+open(DOC, '<', "$filename.pdf") or do {
print "Content-type: text/html\n";
print "Status: 400 Bad Request Error\n\n";
print '<h1>400 Bad Request</h1>';
die;
-}
+};
print "Content-type: application/pdf\n\n";
print <DOC>;
close(DOC);