summaryrefslogtreecommitdiff
path: root/t/op/smartmatch.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-07 21:55:36 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-07 21:55:36 +0000
commitd3d1232e4b14141281f4266718249fa2750cd14e (patch)
tree602ff745324e4f64ecade6a63bcbe50aae95c063 /t/op/smartmatch.t
parentb93d0e6249447a8bdcbd59208d8e8138756bae7c (diff)
downloadperl-d3d1232e4b14141281f4266718249fa2750cd14e.tar.gz
Refactor 4 tests to use skip_if_miniperl().
Diffstat (limited to 't/op/smartmatch.t')
-rw-r--r--t/op/smartmatch.t9
1 files changed, 4 insertions, 5 deletions
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t
index f14e91ca94..da4840eaca 100644
--- a/t/op/smartmatch.t
+++ b/t/op/smartmatch.t
@@ -11,7 +11,6 @@ no warnings 'uninitialized';
use Tie::Array;
use Tie::Hash;
-use if !$ENV{PERL_CORE_MINITEST}, "Tie::RefHash";
# Predeclare vars used in the tests:
my @empty;
@@ -62,7 +61,8 @@ our $obj = Test::Object::NoOverload->new;
our $str_obj = Test::Object::StringOverload->new;
my %refh;
-if (!$ENV{PERL_CORE_MINITEST}) {
+unless (is_miniperl()) {
+ require Tie::RefHash;
tie %refh, 'Tie::RefHash';
$refh{$ov_obj} = 1;
}
@@ -92,10 +92,9 @@ while (<DATA>) {
if ($note =~ /NOWARNINGS/) {
$res = eval "no warnings; $tstr";
}
- elsif ($note =~ /MINISKIP/ && $ENV{PERL_CORE_MINITEST}) {
- skip("Doesn't work with miniperl", $yn =~ /=/ ? 2 : 1);
- }
else {
+ skip_if_miniperl("Doesn't work with miniperl", $yn =~ /=/ ? 2 : 1)
+ if $note =~ /MINISKIP/;
$res = eval $tstr;
}