Skip to content

Commit 4821494

Browse files
peffgitster
authored andcommitted
t0021: fix filehandle usage on older perl
The rot13-filter.pl script calls methods on implicitly defined filehandles (STDOUT, and the result of an open() call). Prior to perl 5.13, these methods are not automatically loaded, and perl will complain with: Can't locate object method "flush" via package "IO::Handle" Let's explicitly load IO::File (which inherits from IO::Handle). That's more than we need for just "flush", but matches what perl has done since: http://perl5.git.perl.org/perl.git/commit/15e6cdd91beb4cefae4b65e855d68cf64766965d Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f272696 commit 4821494

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/t0021/rot13-filter.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
use strict;
2323
use warnings;
24+
use IO::File;
2425

2526
my $MAX_PACKET_CONTENT_SIZE = 65516;
2627
my @capabilities = @ARGV;

0 commit comments

Comments
 (0)