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>
Sat, 15 Jan 2011 06:30:12 +0000 (22:30 -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.

Change-Id: Ibeda39f2620ab1056e2d42838833d140ec3c053f
Reviewed-on: http://gerrit.openafs.org/3661
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

doc/man-pages/merge-pod

index b1e0da3..d35b6e1 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";