diff options
author | Eric Wong <e@yhbt.net> | 2020-06-20 00:13:01 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-21 17:31:42 +0000 |
commit | 476f054f21ee64a08418cacb23b5a48c68858441 (patch) | |
tree | ae297cefefa1a56e7683dadcef27e8f2f7b29551 /lib/PublicInbox/TestCommon.pm | |
parent | 0e6ceff37fc38f28a1520d7475f31d47f74ec7e6 (diff) | |
download | public-inbox-476f054f21ee64a08418cacb23b5a48c68858441.tar.gz |
testcommon: require IO::Socket::SSL >= 2.007
Net::NNTP does not support older IO::Socket::SSL. 1.94 on CentOS 7.x fails HTTPS and IMAPS tests, too. cf. https://rt.cpan.org/Ticket/Display.html?id=100529
Diffstat (limited to 'lib/PublicInbox/TestCommon.pm')
-rw-r--r-- | lib/PublicInbox/TestCommon.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index a97125e5..6bf4526a 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -95,7 +95,15 @@ sub require_mods { } else { eval "require $mod"; } - push @need, $mod if $@; + if ($@) { + push @need, $mod; + } elsif ($mod eq 'IO::Socket::SSL' && + # old versions of IO::Socket::SSL aren't supported + # by libnet, at least: + # https://rt.cpan.org/Ticket/Display.html?id=100529 + !eval{ IO::Socket::SSL->VERSION(2.007); 1 }) { + push @need, $@; + } } return unless @need; my $m = join(', ', @need)." missing for $0"; |