]> granicus.if.org Git - postgresql/commitdiff
Improve style of generate_history.pl Perl script.
authorBruce Momjian <bruce@momjian.us>
Thu, 5 May 2011 16:48:48 +0000 (12:48 -0400)
committerBruce Momjian <bruce@momjian.us>
Thu, 5 May 2011 16:49:23 +0000 (12:49 -0400)
doc/src/sgml/generate_history.pl

index 2b81569b9ac4f4681a0c8be50765734e18da444a..a6c0bd77c23c92b8419d6dc018a582e1e7aab26e 100644 (file)
 
 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 "<!DOCTYPE appendix PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\">\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 (<FILE>) {