]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
merge-pod: Be more compatible with older perl
authorAndrew Deason <adeason@sinenomine.net>
Fri, 14 Jan 2011 20:00:14 +0000 (14:00 -0600)
committerDerrick Brashear <shadow@dementia.org>
Mon, 31 Jan 2011 17:40:54 +0000 (09:40 -0800)
merge-pod works fine with perl 5.00503, if we eliminate the 3-argument
invocation of open(). So, replace the open() calls with their
2-argument equivalent, and relax the version requirement a bit.

Reviewed-on: http://gerrit.openafs.org/3661
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2045653647fc2de451c9615f18316416de7e1657)

Change-Id: Ie3945eb37628ed3bd55f9cb53dd2f4d122f3b087
Reviewed-on: http://gerrit.openafs.org/3778
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
doc/man-pages/merge-pod

index b1e0da363a92b99d2fd797d12d36bf9985fc4d5e..d35b6e1297d88830c5bf64aef39c9956121c046d 100755 (executable)
@@ -10,7 +10,7 @@
 # Currently, only single include nesting is supported.  The included file is
 # not processed for additional =include statements.
 
-require 5.006;
+require 5.00503;
 
 use Cwd qw(getcwd);
 use File::Basename qw(dirname basename);
@@ -23,14 +23,14 @@ for my $file (@ARGV) {
     unless ($out =~ s/\.in\z//) {
         die "input file $file does not end in .in\n";
     }
-    open (FILE, '<', $file) or die "cannot open $file: $!\n";
-    open (OUT, '>', $out) or die "cannot open $out: $!\n";
+    open (FILE, "< $file") or die "cannot open $file: $!\n";
+    open (OUT, "> $out") or die "cannot open $out: $!\n";
     chdir $dir or die "cannot chdir to $dir: $!\n";
     local $/ = '';
     local $_;
     while (<FILE>) {
         if (/^=include\s+(\S+)/) {
-            open (INCLUDE, '<', $1) or die "cannot open $1: $!\n";
+            open (INCLUDE, "< $1") or die "cannot open $1: $!\n";
             local $/;
             print OUT <INCLUDE> or die "cannot read/write from $1: $!\n";
             close INCLUDE or die "cannot read from $1: $!\n";