@@ -6,12 +6,6 @@ use warnings;
66
77our $VERSION = ' 1.302206' ;
88
9- BEGIN {
10- if ( $] < 5.008 ) {
11- require Test::Builder::IO::Scalar;
12- }
13- }
14-
159use Scalar::Util qw/ blessed reftype weaken/ ;
1610
1711use Test2::Util qw/ USE_THREADS try get_tid/ ;
@@ -1366,27 +1360,19 @@ sub todo_output {
13661360
13671361sub _new_fh {
13681362 my $self = shift ;
1369- my ($file_or_fh ) = shift ;
1363+ my ($file_or_fh ) = shift ;
13701364
13711365 my $fh ;
1372- if ( $self -> is_fh($file_or_fh ) ) {
1366+ if ( $self -> is_fh($file_or_fh )) {
13731367 $fh = $file_or_fh ;
13741368 }
1375- elsif ( ref $file_or_fh eq ' SCALAR' ) {
1376- # Scalar refs as filehandles was added in 5.8.
1377- if ( $] >= 5.008 ) {
1378- open $fh , " >>" , $file_or_fh
1379- or $self -> croak(" Can't open scalar ref $file_or_fh : $! " );
1380- }
1381- # Emulate scalar ref filehandles with a tie.
1382- else {
1383- $fh = Test::Builder::IO::Scalar-> new($file_or_fh )
1384- or $self -> croak(" Can't tie scalar ref $file_or_fh " );
1385- }
1369+ elsif (ref $file_or_fh eq ' SCALAR' ) {
1370+ open $fh , " >>" , $file_or_fh
1371+ or $self -> croak(" Can't open scalar ref $file_or_fh : $! " );
13861372 }
13871373 else {
13881374 open $fh , " >" , $file_or_fh
1389- or $self -> croak(" Can't open test output log $file_or_fh : $! " );
1375+ or $self -> croak(" Can't open test output log $file_or_fh : $! " );
13901376 _autoflush($fh );
13911377 }
13921378
0 commit comments