From 0ef88544f2831dc8fe0ddf0d4bf452340f6ef0e6 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 16 Mar 2011 08:57:54 +0000 Subject: [PATCH] Switch t/lib/no_load.t to done_testing() from using an explicit plan. Using done_testing() means that it doesn't have to parse the test data structure twice - firstly to calculate the number of tests, secondly to actually run them. --- t/lib/no_load.t | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/t/lib/no_load.t b/t/lib/no_load.t index 3f10200..84a8cac 100644 --- a/t/lib/no_load.t +++ b/t/lib/no_load.t @@ -16,16 +16,9 @@ require "test.pl"; # # Format: [Module-that-should-not-be-loaded => modules to test] # -my @TESTS = ( - [Carp => qw [warnings Exporter]], -); -my $count = 0; -$count += @$_ - 1 for @TESTS; - -print "1..$count\n"; - -foreach my $test (@TESTS) { +foreach my $test ([Carp => qw(warnings Exporter)], + ) { my ($exclude, @modules) = @$test; foreach my $module (@modules) { @@ -37,5 +30,4 @@ foreach my $test (@TESTS) { } } - -__END__ +done_testing(); -- 2.7.4