diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-06-14 11:28:31 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-07-02 15:33:27 +0200 |
commit | adede1cdbfb291b7f8dee95da22884f2d465056e (patch) | |
tree | 5d01f5a5fdbf19b1d60265c875672c359034a24b /t | |
parent | 43ccc0dbf87e28eafef70ac7905b65768f810bbd (diff) | |
download | perl-adede1cdbfb291b7f8dee95da22884f2d465056e.tar.gz |
Minor refactors to FindExt's test, removing code duplication.
Use a ternary instead of if/unless on the same $^O test.
Use a loop to call FindExt::scan_ext()
As FindExt exports nothing, we can require it rather than using it.
Diffstat (limited to 't')
-rw-r--r-- | t/porting/FindExt.t | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/t/porting/FindExt.t b/t/porting/FindExt.t index a20acf09aa..7b950725a8 100644 --- a/t/porting/FindExt.t +++ b/t/porting/FindExt.t @@ -21,14 +21,13 @@ unless (defined $Config{usedl}) { } plan tests => 12; -use FindExt; +require FindExt; FindExt::apply_config(\%Config); -FindExt::scan_ext('../cpan'); -FindExt::scan_ext('../dist'); -FindExt::scan_ext('../ext'); -FindExt::set_static_extensions(split ' ', $ENV{PERL_STATIC_EXT}) if $^O eq "MSWin32"; -FindExt::set_static_extensions(split ' ', $Config{static_ext}) unless $^O eq "MSWin32"; +FindExt::scan_ext("../$_") + foreach qw(cpan dist ext); +FindExt::set_static_extensions(split ' ', $^O eq 'MSWin32' + ? $ENV{PERL_STATIC_EXT} : $Config{static_ext}); # Config.pm and FindExt.pm make different choices about what should be built my @config_built; |