perl: use the 'if' module to conditionally load File::Glob
Trying to use normal perl conditions to conditionally 'use' a perl module didn't quite work. Using the 'if' module to do so does work. Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
parent
453fc7a018
commit
23049aa52e
5 changed files with 5 additions and 15 deletions
|
@ -14,9 +14,7 @@ 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/;
|
||||
}
|
||||
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
|
||||
|
||||
# see INSTALL for instructions.
|
||||
|
||||
|
|
|
@ -13,9 +13,7 @@ use warnings;
|
|||
use File::Spec::Functions;
|
||||
use File::Copy;
|
||||
use File::Basename;
|
||||
if ($^O ne "VMS") {
|
||||
use File::Glob qw/glob/;
|
||||
}
|
||||
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
|
||||
use OpenSSL::Test qw/:DEFAULT bldtop_file/;
|
||||
|
||||
setup("test_rehash");
|
||||
|
|
|
@ -12,9 +12,7 @@ use warnings;
|
|||
|
||||
use File::Basename;
|
||||
use File::Compare qw/compare_text/;
|
||||
if ($^O ne "VMS") {
|
||||
use File::Glob qw/glob/;
|
||||
}
|
||||
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
|
||||
|
||||
use OpenSSL::Test qw/:DEFAULT srctop_dir srctop_file/;
|
||||
use OpenSSL::Test::Utils qw/disabled alldisabled available_protocols/;
|
||||
|
|
|
@ -16,9 +16,7 @@ BEGIN {
|
|||
|
||||
use File::Spec::Functions qw/catdir catfile curdir abs2rel rel2abs/;
|
||||
use File::Basename;
|
||||
if ($^O ne "VMS") {
|
||||
use File::Glob qw/glob/;
|
||||
}
|
||||
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
|
||||
use Test::Harness qw/runtests $switches/;
|
||||
|
||||
my $srctop = $ENV{SRCTOP} || $ENV{TOP};
|
||||
|
|
|
@ -13,9 +13,7 @@ use File::Spec::Functions;
|
|||
use File::Basename;
|
||||
use File::Copy;
|
||||
use File::Path;
|
||||
if ($^O ne "VMS") {
|
||||
use File::Glob qw/glob/;
|
||||
}
|
||||
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
|
||||
|
|
Loading…
Reference in a new issue