From 2cf52df0d8e94232c9e41c3effac6a5a4b5953c8 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Tue, 2 Jun 2020 22:51:56 -0400 Subject: realized i use strict --- minimun.spec | 2 +- orig/minimun | 12 ++++++------ 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 '

400 Bad Request

'; die; -} +}; print "Content-type: application/pdf\n\n"; print ; close(DOC); -- cgit