about summary refs log tree commit homepage
path: root/lib/PublicInbox/TestCommon.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/TestCommon.pm')
-rw-r--r--lib/PublicInbox/TestCommon.pm10
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";