@@ -47,7 +47,6 @@ use warnings FATAL => qw/ io inplace /;
47
47
our $DEBUG = 0;
48
48
our $FE = $] ge ' 5.012' && $] lt ' 5.029007' ? !!0 : !!1; # FE="first eof", see https://github.com/Perl/perl5/issues/16786
49
49
our $CE ; # CE="can't eof()", Perl <5.12 doesn't support eof() on tied filehandles (gets set below)
50
- # plus try to work around https://github.com/Perl/perl5/issues/20207 on >5.36
51
50
our $FL = undef ; # FL="First Line"
52
51
# Apparently there are some versions of Perl on Win32 where the following two appear to work slightly differently.
53
52
# I've seen differing results on different systems and I'm not sure why, so I set it dynamically... not pretty, but this test isn't critical.
@@ -87,7 +86,7 @@ sub testboth { ## no critic (RequireArgUnpacking)
87
86
{
88
87
local $TESTMODE = ' Inplace' ;
89
88
local (*ARGV , *ARGVOUT, $. , $^I); # # no critic (RequireInitializationForLocalVars)
90
- local $CE = $] lt ' 5.012' || $] gt ' 5.036 ' ;
89
+ local $CE = $] lt ' 5.012' ;
91
90
my $inpl = File::Replace::Inplace-> new(debug => $DEBUG , %$args );
92
91
my $osi = defined ($stdin ) ? OverrideStdin-> new($stdin ) : undef ;
93
92
subtest " $name - ::Inplace" => $sub ;
@@ -122,7 +121,7 @@ testboth 'basic test' => sub { plan tests=>9;
122
121
};
123
122
124
123
testboth ' basic test with eof()' => sub {
125
- if ($CE ) { plan skip_all => " eof() not supported on tied handles on Perl<5.12 or >5.36 " }
124
+ if ($CE ) { plan skip_all => " eof() not supported on tied handles on Perl<5.12" }
126
125
elsif ($^O eq ' MSWin32' ) { plan skip_all => " eof() acts differently on Win32" }
127
126
else { plan tests => 9 }
128
127
my @tf = (newtempfn(" Foo\n Bar" ), newtempfn(" Quz\n Baz\n " ));
@@ -371,7 +370,7 @@ testboth 'restart with emptied @ARGV (STDIN)' => sub {
371
370
push @states , [[@ARGV ], $ARGV , defined (fileno ARGV ), defined (fileno ARGVOUT), $. , eof ];
372
371
is select (), ' main::STDOUT' , ' STDOUT is selected in between' ;
373
372
SKIP: {
374
- skip " eof() not supported on tied handles on Perl<5.12 or >5.36 " , 2 if $CE ;
373
+ skip " eof() not supported on tied handles on Perl<5.12" , 2 if $CE ;
375
374
ok !eof (), ' eof() is false' ;
376
375
is select (), ' main::STDOUT' , ' STDOUT is still selected' ;
377
376
}
@@ -474,7 +473,7 @@ subtest 'create option' => sub { plan tests=>9;
474
473
475
474
subtest ' premature destroy' => sub { plan tests => 7;
476
475
local (*ARGV , *ARGVOUT, $. , $^I); # # no critic (RequireInitializationForLocalVars)
477
- local $CE = $] lt ' 5.012' || $] gt ' 5.036 ' ;
476
+ local $CE = $] lt ' 5.012' ;
478
477
is grep ( {/ \b unclosed file\b .+\b not replaced\b /i } warns {
479
478
my $tfn = newtempfn(" IJK\n MNO" );
480
479
@ARGV = ($tfn ); # # no critic (RequireLocalizedPunctuationVars)
0 commit comments