Patch to improve style of generate_history.pl perl script
Patch to improve style of generate_history.pl perl script
От:
Bruce Momjian <bruce@momjian.us>
Дата:
I have applied the attached patch to improve the style of our
generate_history.pl perl script.
--
Bruce Momjian http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
diff --git a/doc/src/sgml/generate_history.pl b/doc/src/sgml/generate_history.pl
new file mode 100644
index 2b81569..a6c0bd7
*** a/doc/src/sgml/generate_history.pl
--- b/doc/src/sgml/generate_history.pl
***************
*** 13,22 ****
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";
# Emit DOCTYPE header so that the output is a self-contained SGML document
print "\n";
--- 13,22 ----
use strict;
! 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";
*************** process_file($infile);
*** 26,36 ****
exit 0;
sub process_file {
! my($filename) = @_;
local *FILE; # need a local filehandle so we can recurse
! my($f) = $srcdir . '/' . $filename;
open(FILE, $f) || die "could not read $f: $!\n";
while () {
--- 26,36 ----
exit 0;
sub process_file {
! my $filename = shift;
local *FILE; # need a local filehandle so we can recurse
! my $f = $srcdir . '/' . $filename;
open(FILE, $f) || die "could not read $f: $!\n";
while () {
Re: Patch to improve style of generate_history.pl perl script
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
On 05/05/2011 12:49 PM, Bruce Momjian wrote: > I have applied the attached patch to improve the style of our > generate_history.pl perl script. > Wow, really? There's nothing wrong with the changes but they seem pretty trivial and pointless to me. Maybe I've drunk the perl TIMTOWTDI koolaid too much. cheers andrew
Re: Patch to improve style of generate_history.pl perl script
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Andrew Dunstan wrote: > > > On 05/05/2011 12:49 PM, Bruce Momjian wrote: > > I have applied the attached patch to improve the style of our > > generate_history.pl perl script. > > > > Wow, really? There's nothing wrong with the changes but they seem pretty > trivial and pointless to me. Maybe I've drunk the perl TIMTOWTDI koolaid > too much. I wanted it to be consistent with our other Perl script. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +