From: Bruce Momjian Date: Thu, 5 May 2011 16:48:48 +0000 (-0400) Subject: Improve style of generate_history.pl Perl script. X-Git-Tag: REL9_1_BETA2~167 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb3ad7895ece674fc5298df754253f70cda6a02e;p=postgresql Improve style of generate_history.pl Perl script. --- diff --git a/doc/src/sgml/generate_history.pl b/doc/src/sgml/generate_history.pl index 2b81569b9a..a6c0bd77c2 100644 --- a/doc/src/sgml/generate_history.pl +++ b/doc/src/sgml/generate_history.pl @@ -13,10 +13,10 @@ use strict; -my($srcdir) = shift; -defined($srcdir) || die "$0: missing required argument: srcdir\n"; -my($infile) = shift; -defined($infile) || die "$0: missing required argument: inputfile\n"; +my $srcdir = shift; +die "$0: missing required argument: srcdir\n" if !defined($srcdir); +my $infile = shift; +die "$0: missing required argument: inputfile\n" if !defined($infile); # Emit DOCTYPE header so that the output is a self-contained SGML document print "\n"; @@ -26,11 +26,11 @@ process_file($infile); exit 0; sub process_file { - my($filename) = @_; + my $filename = shift; local *FILE; # need a local filehandle so we can recurse - my($f) = $srcdir . '/' . $filename; + my $f = $srcdir . '/' . $filename; open(FILE, $f) || die "could not read $f: $!\n"; while () {