summaryrefslogtreecommitdiff
path: root/t/test.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-08 10:46:14 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-08 10:46:14 +0000
commit77ba2250b324d4fdc54cedfc356f3197ea6cc717 (patch)
treeabdb0a19ccef6d31455fdc7ee7722b173066ecd9 /t/test.pl
parent4f018ed094fde8223d458959a30ea42ff841f880 (diff)
downloadperl-77ba2250b324d4fdc54cedfc356f3197ea6cc717.tar.gz
Refactor skip_all_without_config() to take a list of config options to test.
Previously it took a second argument as a reason to show in the skip_all message, if the config option was not set. However, no callers were using it, so remove it. This allows skip_all_without_config() to take a list of keys to test, which is useful to two of its callers.
Diffstat (limited to 't/test.pl')
-rw-r--r--t/test.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/t/test.pl b/t/test.pl
index fa151eced2..01035afc33 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -137,18 +137,17 @@ sub skip_all_without_perlio {
}
sub skip_all_without_config {
- my ($key, $reason) = @_;
unless (eval 'require Config; 1') {
warn "test.pl had problems loading Config: $@";
return;
}
- return if $Config::Config{$key};
- unless (defined $reason) {
+ foreach (@_) {
+ next if $Config::Config{$_};
+ my $key = $_; # Need to copy, before trying to modify.
$key =~ s/^use//;
$key =~ s/^d_//;
- $reason = "no $key";
+ skip_all("no $key");
}
- skip_all($reason);
}
sub _ok {