line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Most; |
2
|
|
|
|
|
|
|
|
3
|
17
|
|
|
17
|
|
94393
|
use warnings; |
|
16
|
|
|
|
|
140
|
|
|
16
|
|
|
|
|
531
|
|
4
|
17
|
|
|
17
|
|
87
|
use strict; |
|
17
|
|
|
|
|
31
|
|
|
17
|
|
|
|
|
401
|
|
5
|
|
|
|
|
|
|
|
6
|
17
|
|
|
17
|
|
5747
|
use Test::Most::Exception 'throw_failure'; |
|
17
|
|
|
|
|
44
|
|
|
17
|
|
|
|
|
929
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# XXX don't use 'base' as it can override signal handlers |
9
|
17
|
|
|
17
|
|
7222
|
use Test::Builder::Module; |
|
17
|
|
|
|
|
918873
|
|
|
17
|
|
|
|
|
147
|
|
10
|
|
|
|
|
|
|
our ( @ISA, @EXPORT, $DATA_DUMPER_NAMES_INSTALLED ); |
11
|
|
|
|
|
|
|
my $HAVE_TIME_HIRES; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
BEGIN { |
14
|
|
|
|
|
|
|
|
15
|
17
|
|
|
17
|
|
12181
|
require Test::More; |
16
|
17
|
50
|
|
|
|
79046
|
if (Test::More->can('TB_PROVIDER_META')) { |
17
|
1
|
|
|
|
|
5
|
Test::More->import(import => [ '!explain' ]); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
else { |
20
|
|
|
|
|
|
|
# There's some strange fiddling around with import(), so this allows us to |
21
|
|
|
|
|
|
|
# be nicely backwards compatible to earlier versions of Test::More. |
22
|
16
|
|
|
|
|
51
|
@Test::More::EXPORT = grep { $_ ne 'explain' } @Test::More::EXPORT; |
|
448
|
|
|
|
|
645
|
|
23
|
16
|
|
|
|
|
99
|
Test::More->import; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
16
|
|
|
16
|
|
4329
|
eval "use Time::HiRes"; |
|
16
|
|
|
|
|
9114
|
|
|
16
|
|
|
|
|
22910
|
|
|
16
|
|
|
|
|
67
|
|
27
|
16
|
50
|
|
|
|
2042
|
$HAVE_TIME_HIRES = 1 unless $@; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
16
|
|
|
16
|
|
101
|
use Test::Builder; |
|
16
|
|
|
|
|
39
|
|
|
16
|
|
|
|
|
519
|
|
31
|
|
|
|
|
|
|
my $OK_FUNC; |
32
|
|
|
|
|
|
|
BEGIN { |
33
|
16
|
|
|
16
|
|
1949
|
$OK_FUNC = \&Test::Builder::ok; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
our $VERSION = '0.36'; |
37
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
BEGIN { |
40
|
16
|
|
|
16
|
|
311
|
@ISA = qw(Test::Builder::Module); |
41
|
|
|
|
|
|
|
@EXPORT = ( |
42
|
|
|
|
|
|
|
Test::More->can('TB_PROVIDER_META') |
43
|
16
|
50
|
|
|
|
3984
|
? grep { $_ ne 'TODO' } keys( %{Test::More->TB_PROVIDER_META->{attrs}}) |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
44
|
|
|
|
|
|
|
: @Test::More::EXPORT, |
45
|
|
|
|
|
|
|
qw< |
46
|
|
|
|
|
|
|
$TODO |
47
|
|
|
|
|
|
|
all_done |
48
|
|
|
|
|
|
|
bail_on_fail |
49
|
|
|
|
|
|
|
die_on_fail |
50
|
|
|
|
|
|
|
explain |
51
|
|
|
|
|
|
|
always_explain |
52
|
|
|
|
|
|
|
last_test_failed |
53
|
|
|
|
|
|
|
restore_fail |
54
|
|
|
|
|
|
|
set_failure_handler |
55
|
|
|
|
|
|
|
show |
56
|
|
|
|
|
|
|
always_show |
57
|
|
|
|
|
|
|
> |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub import { |
62
|
17
|
|
|
17
|
|
1036
|
my $bail_set = 0; |
63
|
|
|
|
|
|
|
|
64
|
17
|
|
|
|
|
38
|
my %modules_to_load = map { $_ => 1 } qw/ |
|
68
|
|
|
|
|
165
|
|
65
|
|
|
|
|
|
|
Test::Differences |
66
|
|
|
|
|
|
|
Test::Exception |
67
|
|
|
|
|
|
|
Test::Deep |
68
|
|
|
|
|
|
|
Test::Warn |
69
|
|
|
|
|
|
|
/; |
70
|
17
|
|
|
|
|
166
|
warnings->import; |
71
|
17
|
|
|
|
|
72
|
strict->import; |
72
|
16
|
|
|
16
|
|
2708
|
eval "use Data::Dumper::Names 0.03"; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
834
|
|
73
|
17
|
|
|
|
|
74
|
$DATA_DUMPER_NAMES_INSTALLED = !$@; |
74
|
|
|
|
|
|
|
|
75
|
17
|
100
|
|
|
|
99
|
if ( $ENV{BAIL_ON_FAIL} ) { |
76
|
1
|
|
|
|
|
2
|
$bail_set = 1; |
77
|
1
|
|
|
|
|
2
|
bail_on_fail(); |
78
|
|
|
|
|
|
|
} |
79
|
17
|
100
|
100
|
|
|
123
|
if ( !$bail_set and $ENV{DIE_ON_FAIL} ) { |
80
|
1
|
|
|
|
|
2
|
die_on_fail(); |
81
|
|
|
|
|
|
|
} |
82
|
17
|
|
|
|
|
88
|
for my $i ( 0 .. $#_ ) { |
83
|
44
|
100
|
|
|
|
116
|
if ( 'bail' eq $_[$i] ) { |
84
|
1
|
|
|
|
|
7
|
splice @_, $i, 1; |
85
|
1
|
|
|
|
|
3
|
bail_on_fail(); |
86
|
1
|
|
|
|
|
2
|
$bail_set = 1; |
87
|
1
|
|
|
|
|
2
|
last; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
} |
90
|
17
|
|
|
|
|
40
|
my $caller = caller; |
91
|
17
|
|
|
|
|
44
|
for my $i ( 0 .. $#_ ) { |
92
|
45
|
100
|
|
|
|
96
|
if ( 'timeit' eq $_[$i] ) { |
93
|
1
|
|
|
|
|
3
|
splice @_, $i, 1; |
94
|
16
|
|
|
16
|
|
122
|
no strict; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
6878
|
|
95
|
1
|
|
|
|
|
2
|
*{"${caller}::timeit"} = \&timeit; |
|
1
|
|
|
|
|
5
|
|
96
|
1
|
|
|
|
|
2
|
last; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
17
|
|
|
|
|
30
|
my %exclude_symbol; |
101
|
17
|
|
|
|
|
37
|
my $i = 0; |
102
|
|
|
|
|
|
|
|
103
|
17
|
|
|
|
|
32
|
foreach my $do_not_import_by_default (qw/blessed reftype/) { |
104
|
34
|
50
|
|
|
|
55
|
if ( grep { $_ eq $do_not_import_by_default } @_ ) { |
|
88
|
|
|
|
|
184
|
|
105
|
0
|
|
|
|
|
0
|
@_ = grep { $_ ne $do_not_import_by_default } @_; |
|
0
|
|
|
|
|
0
|
|
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
else { |
108
|
34
|
|
|
|
|
77
|
$exclude_symbol{$do_not_import_by_default} = 1; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
17
|
|
|
|
|
52
|
while ($i < @_) { |
113
|
52
|
100
|
100
|
|
|
176
|
if ( !$bail_set and ( 'die' eq $_[$i] ) ) { |
114
|
1
|
|
|
|
|
6
|
splice @_, $i, 1; |
115
|
1
|
|
|
|
|
3
|
die_on_fail(); |
116
|
1
|
|
|
|
|
1
|
$i = 0; |
117
|
1
|
|
|
|
|
4
|
next; |
118
|
|
|
|
|
|
|
} |
119
|
51
|
100
|
|
|
|
127
|
if ( $_[$i] =~ /^-(.*)/ ) { |
120
|
1
|
|
|
|
|
5
|
my $module = $1; |
121
|
1
|
|
|
|
|
3
|
splice @_, $i, 1; |
122
|
1
|
50
|
|
|
|
4
|
unless (exists $modules_to_load{$module}) { |
123
|
0
|
|
|
|
|
0
|
require Carp; |
124
|
0
|
|
|
|
|
0
|
Carp::croak("Cannot remove non-existent Test::Module ($module)"); |
125
|
|
|
|
|
|
|
} |
126
|
1
|
|
|
|
|
2
|
delete $modules_to_load{$module}; |
127
|
1
|
|
|
|
|
2
|
$i = 0; |
128
|
1
|
|
|
|
|
2
|
next; |
129
|
|
|
|
|
|
|
} |
130
|
50
|
100
|
|
|
|
106
|
if ( $_[$i] =~ /^!(.*)/ ) { |
131
|
1
|
|
|
|
|
2
|
splice @_, $i, 1; |
132
|
1
|
|
|
|
|
3
|
$exclude_symbol{$1} = 1; |
133
|
1
|
|
|
|
|
1
|
$i = 0; |
134
|
1
|
|
|
|
|
2
|
next; |
135
|
|
|
|
|
|
|
} |
136
|
49
|
100
|
|
|
|
86
|
if ( 'defer_plan' eq $_[$i] ) { |
137
|
1
|
|
|
|
|
4
|
require Carp; |
138
|
1
|
50
|
|
|
|
3
|
Carp::carp(<<'END') unless $ENV{DO_NOT_WARN_ON_DEFER_PLAN}; |
139
|
|
|
|
|
|
|
defer_plan() is deprecated and will be removed in a future release of |
140
|
|
|
|
|
|
|
Test::Most. It's functionality is provided by Test::More's done_testing(), |
141
|
|
|
|
|
|
|
first added in 2009 (0.88). |
142
|
|
|
|
|
|
|
END |
143
|
1
|
|
|
|
|
2
|
splice @_, $i, 1; |
144
|
|
|
|
|
|
|
|
145
|
1
|
|
|
|
|
4
|
my $builder = Test::Builder->new; |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
# XXX I don't like setting this directly, but |
148
|
|
|
|
|
|
|
# Test::Builder::has_plan isn't public |
149
|
1
|
|
|
|
|
11
|
$builder->{Have_Plan} = 1; |
150
|
1
|
|
|
|
|
2
|
$builder->{TEST_MOST_deferred_plan} = 1; |
151
|
1
|
|
|
|
|
4
|
$builder->{TEST_MOST_all_done} = 0; |
152
|
1
|
|
|
|
|
2
|
$i = 0; |
153
|
1
|
|
|
|
|
2
|
next; |
154
|
|
|
|
|
|
|
} |
155
|
48
|
|
|
|
|
85
|
$i++; |
156
|
|
|
|
|
|
|
} |
157
|
17
|
|
|
|
|
52
|
foreach my $module (keys %modules_to_load) { |
158
|
16
|
|
|
16
|
|
9387
|
eval "use $module"; |
|
16
|
|
|
16
|
|
165218
|
|
|
16
|
|
|
16
|
|
539
|
|
|
16
|
|
|
15
|
|
8649
|
|
|
16
|
|
|
|
|
108201
|
|
|
16
|
|
|
|
|
454
|
|
|
16
|
|
|
|
|
8774
|
|
|
16
|
|
|
|
|
106781
|
|
|
16
|
|
|
|
|
395
|
|
|
15
|
|
|
|
|
8511
|
|
|
15
|
|
|
|
|
140246
|
|
|
15
|
|
|
|
|
603
|
|
|
67
|
|
|
|
|
3544
|
|
159
|
|
|
|
|
|
|
|
160
|
67
|
50
|
|
|
|
7224
|
if ( my $error = $@) { |
161
|
0
|
|
|
|
|
0
|
require Carp; |
162
|
0
|
|
|
|
|
0
|
Carp::croak($error); |
163
|
|
|
|
|
|
|
} |
164
|
16
|
|
|
16
|
|
126
|
no strict 'refs'; |
|
16
|
|
|
|
|
26
|
|
|
16
|
|
|
|
|
5956
|
|
165
|
|
|
|
|
|
|
# Note: export_to_level would be better here. |
166
|
67
|
|
|
|
|
127
|
push @EXPORT => grep { !$exclude_symbol{$_} } @{"${module}::EXPORT"}; |
|
1084
|
|
|
|
|
1756
|
|
|
67
|
|
|
|
|
257
|
|
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
# 'magic' goto to avoid updating the callstack |
170
|
17
|
|
|
|
|
135
|
goto &Test::Builder::Module::import; |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub explain { |
174
|
6
|
|
|
6
|
1
|
13248
|
_explain(\&Test::More::note, @_); |
175
|
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
sub timeit(&;$) { |
179
|
2
|
|
|
2
|
1
|
1669
|
my ( $code, $message ) = @_; |
180
|
2
|
50
|
|
|
|
7
|
unless($HAVE_TIME_HIRES) { |
181
|
0
|
|
|
|
|
0
|
Test::Most::diag("timeit: Time::HiRes not installed"); |
182
|
0
|
|
|
|
|
0
|
$code->(); |
183
|
|
|
|
|
|
|
} |
184
|
2
|
100
|
|
|
|
5
|
if ( !$message ) { |
185
|
1
|
|
|
|
|
5
|
my ( $package, $filename, $line ) = caller; |
186
|
1
|
|
|
|
|
5
|
$message = "$filename line $line"; |
187
|
|
|
|
|
|
|
} |
188
|
2
|
|
|
|
|
10
|
my $start = [Time::HiRes::gettimeofday()]; |
189
|
2
|
|
|
|
|
5
|
$code->(); |
190
|
2
|
|
|
|
|
821
|
explain( |
191
|
|
|
|
|
|
|
sprintf "$message: took %s seconds" => Time::HiRes::tv_interval($start) ); |
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub always_explain { |
195
|
2
|
|
|
2
|
1
|
2312
|
_explain(\&Test::More::diag, @_); |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub _explain { |
199
|
10
|
|
|
10
|
|
20
|
my $diag = shift; |
200
|
16
|
|
|
16
|
|
143
|
no warnings 'once'; |
|
16
|
|
|
|
|
42
|
|
|
16
|
|
|
|
|
4195
|
|
201
|
|
|
|
|
|
|
$diag->( |
202
|
|
|
|
|
|
|
map { |
203
|
10
|
|
|
|
|
22
|
ref $_ |
204
|
14
|
100
|
|
|
|
160
|
? do { |
205
|
5
|
|
|
|
|
28
|
require Data::Dumper; |
206
|
5
|
|
|
|
|
8
|
local $Data::Dumper::Indent = 1; |
207
|
5
|
|
|
|
|
7
|
local $Data::Dumper::Sortkeys = 1; |
208
|
5
|
|
|
|
|
6
|
local $Data::Dumper::Terse = 1; |
209
|
5
|
|
|
|
|
12
|
Data::Dumper::Dumper($_); |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
: $_ |
212
|
|
|
|
|
|
|
} @_ |
213
|
|
|
|
|
|
|
); |
214
|
|
|
|
|
|
|
} |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
sub show { |
217
|
1
|
|
|
1
|
1
|
1047
|
_show(\&Test::More::note, @_); |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
sub always_show { |
221
|
1
|
|
|
1
|
1
|
1255
|
_show(\&Test::More::diag, @_); |
222
|
|
|
|
|
|
|
} |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
sub _show { |
225
|
2
|
50
|
|
2
|
|
7
|
unless ( $DATA_DUMPER_NAMES_INSTALLED ) { |
226
|
2
|
|
|
|
|
10
|
require Carp; |
227
|
2
|
|
|
|
|
28
|
Carp::carp("Data::Dumper::Names 0.03 not found. Use explain() instead of show()"); |
228
|
2
|
|
|
|
|
1086
|
goto &_explain; |
229
|
|
|
|
|
|
|
} |
230
|
0
|
|
|
|
|
0
|
my $diag = shift; |
231
|
16
|
|
|
16
|
|
114
|
no warnings 'once'; |
|
16
|
|
|
|
|
31
|
|
|
16
|
|
|
|
|
3265
|
|
232
|
0
|
|
|
|
|
0
|
local $Data::Dumper::Indent = 1; |
233
|
0
|
|
|
|
|
0
|
local $Data::Dumper::Sortkeys = 1; |
234
|
0
|
|
|
|
|
0
|
local $Data::Dumper::Names::UpLevel = $Data::Dumper::Names::UpLevel + 2; |
235
|
0
|
|
|
|
|
0
|
$diag->(Data::Dumper::Names::Dumper(@_)); |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
sub die_on_fail { |
239
|
0
|
|
|
0
|
1
|
0
|
set_failure_handler( sub { throw_failure } ); |
|
3
|
|
|
3
|
|
1205
|
|
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
sub bail_on_fail { |
243
|
|
|
|
|
|
|
set_failure_handler( |
244
|
0
|
|
|
0
|
1
|
0
|
sub { Test::More::BAIL_OUT("Test failed. BAIL OUT!.\n") } ); |
|
3
|
|
|
3
|
|
1108
|
|
245
|
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
sub restore_fail { |
248
|
16
|
|
|
16
|
|
113
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
26
|
|
|
16
|
|
|
|
|
2243
|
|
249
|
0
|
|
|
0
|
1
|
0
|
*Test::Builder::ok = $OK_FUNC; |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
sub all_done { |
253
|
1
|
|
|
1
|
1
|
1135
|
my $builder = Test::Builder->new; |
254
|
1
|
50
|
|
|
|
10
|
if ($builder->{TEST_MOST_deferred_plan}) { |
255
|
1
|
|
|
|
|
2
|
$builder->{TEST_MOST_all_done} = 1; |
256
|
1
|
50
|
|
|
|
8
|
$builder->expected_tests(@_ ? $_[0] : $builder->current_test); |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub set_failure_handler { |
262
|
6
|
|
|
6
|
1
|
12
|
my $action = shift; |
263
|
16
|
|
|
16
|
|
141
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
48
|
|
|
16
|
|
|
|
|
3323
|
|
264
|
6
|
|
|
|
|
27
|
Test::Builder->new->{TEST_MOST_failure_action} = $action; # for DESTROY |
265
|
|
|
|
|
|
|
*Test::Builder::ok = sub { |
266
|
38
|
|
|
38
|
|
96435
|
local $Test::Builder::Level = $Test::Builder::Level + 1; |
267
|
38
|
|
|
|
|
61
|
my $builder = $_[0]; |
268
|
38
|
50
|
|
|
|
93
|
if ( $builder->{TEST_MOST_test_failed} ) { |
269
|
0
|
|
|
|
|
0
|
$builder->{TEST_MOST_test_failed} = 0; |
270
|
0
|
|
|
|
|
0
|
$action->($builder); |
271
|
|
|
|
|
|
|
} |
272
|
38
|
|
|
|
|
56
|
$builder->{TEST_MOST_test_failed} = 0; |
273
|
38
|
|
|
|
|
90
|
my $result = $OK_FUNC->(@_); |
274
|
38
|
|
|
|
|
16746
|
$builder->{TEST_MOST_test_failed} = !( $builder->summary )[-1]; |
275
|
38
|
|
|
|
|
4983
|
return $result; |
276
|
6
|
|
|
|
|
84
|
}; |
277
|
|
|
|
|
|
|
} |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
{ |
280
|
16
|
|
|
16
|
|
118
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
32
|
|
|
16
|
|
|
|
|
4709
|
|
281
|
|
|
|
|
|
|
my $orig_destroy = Test::Builder->can('DESTROY'); |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
# we need this because if the failure is on the final test, we won't have |
284
|
|
|
|
|
|
|
# a subsequent test triggering the behavior. |
285
|
|
|
|
|
|
|
*Test::Builder::DESTROY = sub { |
286
|
0
|
|
|
0
|
|
0
|
my $builder = $_[0]; |
287
|
0
|
0
|
|
|
|
0
|
if ( $builder->{TEST_MOST_test_failed} ) { |
288
|
0
|
|
0
|
0
|
|
0
|
( $builder->{TEST_MOST_failure_action} || sub {} )->(); |
289
|
|
|
|
|
|
|
} |
290
|
0
|
|
|
|
|
0
|
$orig_destroy->(@_); |
291
|
|
|
|
|
|
|
}; |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub _deferred_plan_handler { |
295
|
16
|
|
|
16
|
|
80
|
my $builder = Test::Builder->new; |
296
|
16
|
50
|
66
|
|
|
559
|
if ($builder->{TEST_MOST_deferred_plan} and !$builder->{TEST_MOST_all_done}) |
297
|
|
|
|
|
|
|
{ |
298
|
0
|
|
|
|
|
|
$builder->expected_tests($builder->current_test + 1); |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
} |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
# This should work because the END block defined by Test::Builder should be |
303
|
|
|
|
|
|
|
# guaranteed to be run before t one, since we use'd Test::Builder way up top. |
304
|
|
|
|
|
|
|
# The other two alternatives would be either to replace Test::Builder::_ending |
305
|
|
|
|
|
|
|
# similar to how we did Test::Builder::ok, or to call Test::Builder::no_ending |
306
|
|
|
|
|
|
|
# and basically rewrite _ending in our own image. Neither is very palatable, |
307
|
|
|
|
|
|
|
# considering _ending's initial underscore. |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
END { |
310
|
16
|
|
|
16
|
|
26622
|
_deferred_plan_handler(); |
311
|
|
|
|
|
|
|
} |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
1; |
314
|
|
|
|
|
|
|
__END__ |