}
}
-sub skip_all {
- my ($msg) = @_;
- require Test::More;
- Test::More::plan(skip_all => $msg);
-}
+my $test_sub = sub {
+ my $sub = shift;
+ my $stash;
+ if ($INC{'Test/Leaner.pm'}) {
+ $stash = \%Test::Leaner::;
+ } else {
+ require Test::More;
+ $stash = \%Test::More::;
+ }
+ return $stash->{$sub};
+};
+
+sub skip_all { $test_sub->('plan')->(skip_all => $_[0]) }
sub diag {
- require Test::More;
- Test::More::diag($_) for @_;
+ my $diag = $test_sub->('diag');
+ $diag->($_) for @_;
}
our $TODO;