From 97855556161155d87635787aca341a6a86b2f9e4 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 28 May 2016 16:11:01 +0200 Subject: Configure,test/recipes: "pin" glob to File::Glob::glob. As it turns out default glob's behaviour for quoted argument varies from version to version, making it impossible to Configure or run tests in some cases. The reason for quoting globs was to accommodate source path with spaces in its name, which was treated by default glob as multiple paths. File::Glob::glob on the other hand doesn't consider spaces as delimiters and therefore works with unquoted patterns. [Unfortunaltely File::Glob::glob, being too csh-ly, doesn't work on VMS, hence the "pinning" is conditional.] Reviewed-by: Richard Levitte --- Configure | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Configure') diff --git a/Configure b/Configure index 0c87cd1a69..9e58fc133a 100755 --- a/Configure +++ b/Configure @@ -14,6 +14,9 @@ use strict; use File::Basename; use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/; use File::Path qw/mkpath/; +if ($^O ne "VMS") { + use File::Glob qw/glob/; +} # see INSTALL for instructions. @@ -210,7 +213,7 @@ die "erroneous version information in opensslv.h: ", # Collect target configurations my $pattern = catfile(dirname($0), "Configurations", "*.conf"); -foreach (sort glob("\"$pattern\"") ) { +foreach (sort glob($pattern)) { &read_config($_); } @@ -223,7 +226,7 @@ if (defined $ENV{$local_config_envname}) { $pattern = catfile($ENV{$local_config_envname}, '*.conf'); } - foreach (sort glob($pattern) ) { + foreach (sort glob($pattern)) { &read_config($_); } } -- cgit v1.2.3