diff options
author | Eric Wong <e@yhbt.net> | 2020-01-26 10:29:22 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-28 01:49:50 +0000 |
commit | fb0afdaa35d778c237c40b10216c38e360b248b3 (patch) | |
tree | 83cdfab84a2f40671737638ea53b1e877a05c7e0 /t | |
parent | 9689c65f42c0acc9021953b29ce55730c4cd841d (diff) | |
download | public-inbox-fb0afdaa35d778c237c40b10216c38e360b248b3.tar.gz |
Perl 5.14+ gained the ability to autoload IO::File (and IO::Handle) on missing methods, so relying on this breaks under 5.10.1. There's no reason to load IO::File or IO::Handle when built-in perlops work fine and are even a hair faster.
Diffstat (limited to 't')
-rw-r--r-- | t/httpd-corner.t | 2 | ||||
-rw-r--r-- | t/import.t | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/t/httpd-corner.t b/t/httpd-corner.t index 1f2bb53f..879a023a 100644 --- a/t/httpd-corner.t +++ b/t/httpd-corner.t @@ -278,7 +278,7 @@ SKIP: { waitpid($pid, 0); is($?, 0, 'curl exited successfully'); is(-s $cerr, 0, 'no errors from curl'); - $cout->seek(0, SEEK_SET); + seek($cout, 0, SEEK_SET); is(<$cout>, sha1_hex($str), 'read expected body'); open my $fh, '-|', qw(curl -sS), "$base/async-big" or die $!; @@ -7,8 +7,7 @@ use PublicInbox::MIME; use PublicInbox::Git; use PublicInbox::Import; use PublicInbox::Spawn qw(spawn); -use IO::File; -use Fcntl qw(:DEFAULT); +use Fcntl qw(:DEFAULT SEEK_SET); use File::Temp qw/tempfile/; use PublicInbox::TestCommon; my ($dir, $for_destroy) = tmpdir(); @@ -42,12 +41,12 @@ if ($v2) { my $in = tempfile(); print $in $mime->as_string or die "write failed: $!"; $in->flush or die "flush failed: $!"; - $in->seek(0, SEEK_SET); + seek($in, 0, SEEK_SET); my $out = tempfile(); my $pid = spawn(\@cmd, {}, { 0 => $in, 1 => $out }); is(waitpid($pid, 0), $pid, 'waitpid succeeds on hash-object'); is($?, 0, 'hash-object'); - $out->seek(0, SEEK_SET); + seek($out, 0, SEEK_SET); chomp(my $hashed_obj = <$out>); is($hashed_obj, $info->[0], "last object_id matches exp"); } |