test/run_tests.pl: don't use Module::Load::Conditional.
authorAndy Polyakov <appro@openssl.org>
Fri, 1 Sep 2017 21:13:28 +0000 (23:13 +0200)
committerAndy Polyakov <appro@openssl.org>
Sat, 2 Sep 2017 18:20:51 +0000 (20:20 +0200)
Ironically enough not all installations get Module::Load::Conditional
installed by default... [It's a bit half-hearted, because such
installations are likely to lack more stuffi that is needed, but
nevertheless, it proved to be helpful.]

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4323)

test/run_tests.pl

index 9f517da3a9499dfbfcfaac2d291a9f2c14dff2a4..6343ec7bc3e0860ea38deeb7c9bc0eebfdc4ad5e 100644 (file)
@@ -19,10 +19,9 @@ use File::Basename;
 use FindBin;
 use lib "$FindBin::Bin/../util/perl";
 use OpenSSL::Glob;
-use Module::Load::Conditional qw(can_load);
 
-my $TAP_Harness = can_load(modules => { 'TAP::Harness' => undef }) 
-    ? 'TAP::Harness' : 'OpenSSL::TAP::Harness';
+my $TAP_Harness = eval { require TAP::Harness } ? "TAP::Harness"
+                                                : "OpenSSL::TAP::Harness";
 
 my $srctop = $ENV{SRCTOP} || $ENV{TOP};
 my $bldtop = $ENV{BLDTOP} || $ENV{TOP};