mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
merge-pod: Be more compatible with older perl
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>
This commit is contained in:
parent
3c91f1d881
commit
2045653647
@ -10,7 +10,7 @@
|
|||||||
# Currently, only single include nesting is supported. The included file is
|
# Currently, only single include nesting is supported. The included file is
|
||||||
# not processed for additional =include statements.
|
# not processed for additional =include statements.
|
||||||
|
|
||||||
require 5.006;
|
require 5.00503;
|
||||||
|
|
||||||
use Cwd qw(getcwd);
|
use Cwd qw(getcwd);
|
||||||
use File::Basename qw(dirname basename);
|
use File::Basename qw(dirname basename);
|
||||||
@ -23,14 +23,14 @@ for my $file (@ARGV) {
|
|||||||
unless ($out =~ s/\.in\z//) {
|
unless ($out =~ s/\.in\z//) {
|
||||||
die "input file $file does not end in .in\n";
|
die "input file $file does not end in .in\n";
|
||||||
}
|
}
|
||||||
open (FILE, '<', $file) or die "cannot open $file: $!\n";
|
open (FILE, "< $file") or die "cannot open $file: $!\n";
|
||||||
open (OUT, '>', $out) or die "cannot open $out: $!\n";
|
open (OUT, "> $out") or die "cannot open $out: $!\n";
|
||||||
chdir $dir or die "cannot chdir to $dir: $!\n";
|
chdir $dir or die "cannot chdir to $dir: $!\n";
|
||||||
local $/ = '';
|
local $/ = '';
|
||||||
local $_;
|
local $_;
|
||||||
while (<FILE>) {
|
while (<FILE>) {
|
||||||
if (/^=include\s+(\S+)/) {
|
if (/^=include\s+(\S+)/) {
|
||||||
open (INCLUDE, '<', $1) or die "cannot open $1: $!\n";
|
open (INCLUDE, "< $1") or die "cannot open $1: $!\n";
|
||||||
local $/;
|
local $/;
|
||||||
print OUT <INCLUDE> or die "cannot read/write from $1: $!\n";
|
print OUT <INCLUDE> or die "cannot read/write from $1: $!\n";
|
||||||
close INCLUDE or die "cannot read from $1: $!\n";
|
close INCLUDE or die "cannot read from $1: $!\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user