mirror of
https://github.com/openssl/openssl.git
synced 2025-03-31 20:10:45 +08:00
Make 'with_fallback' use 'use' instead of 'require'
This enables us to require module versions, and to fall back to a bundled version if the system version is too low. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6682)
This commit is contained in:
parent
3550d9159f
commit
e9bc570674
@ -8,15 +8,17 @@
|
||||
package with_fallback;
|
||||
|
||||
sub import {
|
||||
shift;
|
||||
|
||||
use File::Basename;
|
||||
use File::Spec::Functions;
|
||||
foreach (@_) {
|
||||
eval "require $_";
|
||||
eval "use $_";
|
||||
if ($@) {
|
||||
unshift @INC, catdir(dirname(__FILE__),
|
||||
"..", "..", "external", "perl");
|
||||
my $transfer = "transfer::$_";
|
||||
eval "require $transfer";
|
||||
eval "use $transfer";
|
||||
shift @INC;
|
||||
warn $@ if $@;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user