Skip to content

Commit

Permalink
fix compatibility with perl-5.26
Browse files Browse the repository at this point in the history
  • Loading branch information
powerman committed Apr 3, 2018
1 parent 01efbf5 commit d96c2bd
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ perl:
- "5.18"
- "5.20"
- "5.22"
- "5.24"
- "5.26"

env:
global:
Expand Down
3 changes: 2 additions & 1 deletion t/diagnostics.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use warnings;
use strict;
use t::share;
use lib 't';
use share;

plan tests => 19;

Expand Down
3 changes: 2 additions & 1 deletion t/dns-error.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# DNS error.
use warnings;
use strict;
use t::share;
use lib 't';
use share;


# cover code which process stale DNS replies on closed streams
Expand Down
3 changes: 2 additions & 1 deletion t/dns.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# DNS error.
use warnings;
use strict;
use t::share;
use lib 't';
use share;

@CheckPoint = (
{
Expand Down
3 changes: 2 additions & 1 deletion t/err-EAGAIN.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# EAGAIN in sysread/syswrite
use warnings;
use strict;
use t::share;
use lib 't';
use share;

@CheckPoint = (
[ 'timeout_write' ], 'force EAGAIN in syswrite',
Expand Down
3 changes: 2 additions & 1 deletion t/err-rw.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# errors in sysread/syswrite
use warnings;
use strict;
use t::share;
use lib 't';
use share;

use Config;
plan skip_all => 'unstable on CPAN Testers (libev crashes)'
Expand Down
3 changes: 2 additions & 1 deletion t/extra_fields.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# - class/method names instead of CODE ref in {cb}
use warnings;
use strict;
use t::share;
use lib 't';
use share;

my $SIZE = 204800;

Expand Down
3 changes: 2 additions & 1 deletion t/fh-types-all.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# - unix socket
use warnings;
use strict;
use t::share;
use lib 't';
use share;

@CheckPoint = (
[ 'client', SENT ], 'client: SENT',
Expand Down
3 changes: 2 additions & 1 deletion t/fh-types-posix.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# - unix socket
use warnings;
use strict;
use t::share;
use lib 't';
use share;

if (WIN32) {
plan skip_all => 'OS unsupported';
Expand Down
3 changes: 2 additions & 1 deletion t/leak.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Resources (mem/fd) shouldn't leak.
use warnings;
use strict;
use t::share;
use lib 't';
use share;

if ($^O !~ /linux/i) {
plan skip_all => 'require /proc';
Expand Down
3 changes: 2 additions & 1 deletion t/plugin-alias.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# No-op plugins in action.
use warnings;
use strict;
use t::share;
use lib 't';
use share;
BEGIN {
eval { require Data::Alias; Data::Alias->VERSION('0.08') } or plan skip_all => 'Data::Alias required';
}
Expand Down
3 changes: 2 additions & 1 deletion t/plugin.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# No-op plugins in action.
use warnings;
use strict;
use t::share;
use lib 't';
use share;
use IO::Stream::Noop;


Expand Down
3 changes: 2 additions & 1 deletion t/timeout-connect.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Connect timeout (Looks like Google DROP incoming packets on port 21.)
use warnings;
use strict;
use lib 't';
use IO::Stream::const ();
BEGIN {
local $SIG{__WARN__} = sub {}; # no 'constant redefined' warning
*IO::Stream::const::TOCONNECT = sub () { 0.1 };
}
use t::share;
use share;


@CheckPoint = (
Expand Down
3 changes: 2 additions & 1 deletion t/timeout-write-slowclient.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Write timeout.
use warnings;
use strict;
use lib 't';
use IO::Stream::const ();
BEGIN {
local $SIG{__WARN__} = sub {}; # no 'constant redefined' warning
*IO::Stream::const::TOWRITE = sub () { 1 };
}
use t::share;
use share;


@CheckPoint = (
Expand Down
3 changes: 2 additions & 1 deletion t/timeout-write.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Write timeout.
use warnings;
use strict;
use lib 't';
use IO::Stream::const ();
BEGIN {
local $SIG{__WARN__} = sub {}; # no 'constant redefined' warning
*IO::Stream::const::TOWRITE = sub () { 0.1 };
}
use t::share;
use share;


@CheckPoint = (
Expand Down
3 changes: 2 additions & 1 deletion t/uc-echo.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Use case: echo client/server
use warnings;
use strict;
use t::share;
use lib 't';
use share;

my $banner = "Server ready";
my $msg = "Test message!\0\n";
Expand Down
3 changes: 2 additions & 1 deletion t/uc-google.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Use case: HTTP GET until EOF
use warnings;
use strict;
use t::share;
use lib 't';
use share;

IO::Stream->new({
# fh => tcp_client('www.google.com', 80),
Expand Down
3 changes: 2 additions & 1 deletion t/uc-proxy-big-alias.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# data copying in proxy.
use warnings;
use strict;
use t::share;
use lib 't';
use share;
BEGIN {
eval { require Data::Alias; Data::Alias->VERSION('0.08'); Data::Alias->import(); 1 } or plan skip_all => 'Data::Alias required';
}
Expand Down
3 changes: 2 additions & 1 deletion t/uc-proxy-big.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# send/recv a lot of data.
use warnings;
use strict;
use t::share;
use lib 't';
use share;

my $SIZE = 204800;

Expand Down
3 changes: 2 additions & 1 deletion t/uc-proxy.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Use case: client connect to echo server using proxy.
use warnings;
use strict;
use t::share;
use lib 't';
use share;


use constant ACCEPTED => 123;
Expand Down
3 changes: 2 additions & 1 deletion t/wait_for.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# EREQINEOF and EREQINBUFLIMIT.
use warnings;
use strict;
use t::share;
use lib 't';
use share;

@CheckPoint = (
[ 'reader', 0, EREQINEOF ], 'reader: EREQINEOF',
Expand Down

0 comments on commit d96c2bd

Please sign in to comment.