diff options
author | Richard Levitte <levitte@openssl.org> | 2018-07-09 21:07:25 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-07-10 16:34:12 +0200 |
commit | 546574ba92cae095fd1b4c7366c3b5bde4a58383 (patch) | |
tree | 4ec1c1d2dba68b4ac731a280631fecdd360462f6 | |
parent | 7725c76c3f685c306ef4f4125a8a3495e9978a68 (diff) |
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)
(cherry picked from commit e9bc5706744213a1a6748dbbcd1b43a6ad4ca09e)
-rw-r--r-- | util/perl/with_fallback.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/perl/with_fallback.pm b/util/perl/with_fallback.pm index 2af1d5fbd5..fc5638ddf0 100644 --- a/util/perl/with_fallback.pm +++ b/util/perl/with_fallback.pm @@ -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 $@; } |