diff options
author | Richard Levitte <levitte@openssl.org> | 2017-11-03 21:22:17 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-11-05 22:57:06 +0100 |
commit | b81cfa07ada850fd287d0a0c82ba280907f18ce7 (patch) | |
tree | 796f74646a6e66c23af77d8c909bdb2327768437 /util | |
parent | bcc096a50811bf0f0c4fd34b2993fed7a7015972 (diff) |
Perl: Use our own globbing wrapper rather than File::Glob::glob
File::Glob::glob is deprecated, it's use generates this kind of
message:
File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() instead. at ../master/Configure line 277.
The first idea was to use a construction that makes the caller glob()
use File::Glob::bsd_glob(). That turned out not to work well
everywhere, so instead, we make our own wrapper, OpenSSL::Glob and use
that.
Fixes #4636
(this is an adaptation of #4040 and part of #4069, for 1.1.0)
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4666)
Diffstat (limited to 'util')
-rw-r--r-- | util/OpenSSL/Glob.pm | 21 | ||||
-rwxr-xr-x | util/mkdef.pl | 4 | ||||
-rwxr-xr-x | util/process_docs.pl | 4 |
3 files changed, 28 insertions, 1 deletions
diff --git a/util/OpenSSL/Glob.pm b/util/OpenSSL/Glob.pm new file mode 100644 index 0000000000..ec87da4aea --- /dev/null +++ b/util/OpenSSL/Glob.pm @@ -0,0 +1,21 @@ +package OpenSSL::Glob; + +use strict; +use warnings; + +use File::Glob; + +use Exporter; +use vars qw($VERSION @ISA @EXPORT); + +$VERSION = '0.1'; +@ISA = qw(Exporter); +@EXPORT = qw(glob); + +sub glob { + goto &File::Glob::bsd_glob if $^O ne "VMS"; + goto &CORE::glob; +} + +1; +__END__ diff --git a/util/mkdef.pl b/util/mkdef.pl index 5fb2f855d2..ce969db283 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -48,6 +48,10 @@ use lib "."; use configdata; use File::Spec::Functions; +use File::Basename; +use FindBin; +use lib "$FindBin::Bin"; +use OpenSSL::Glob; my $debug=0; diff --git a/util/process_docs.pl b/util/process_docs.pl index 073a3b7031..38c2f3f219 100755 --- a/util/process_docs.pl +++ b/util/process_docs.pl @@ -13,7 +13,9 @@ use File::Spec::Functions; use File::Basename; use File::Copy; use File::Path; -use if $^O ne "VMS", 'File::Glob' => qw/glob/; +use FindBin; +use lib "$FindBin::Bin"; +use OpenSSL::Glob; use Getopt::Long; use Pod::Usage; |