提交 e9bc5706 编写于 作者: R Richard Levitte

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: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6682)
上级 3550d915
......@@ -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 $@;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册