line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Require; |
2
|
10
|
|
|
10
|
|
564
|
use strict; |
|
10
|
|
|
|
|
21
|
|
|
10
|
|
|
|
|
306
|
|
3
|
10
|
|
|
10
|
|
48
|
use warnings; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
420
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000156'; |
6
|
|
|
|
|
|
|
|
7
|
10
|
|
|
10
|
|
880
|
use Test2::API qw/context/; |
|
10
|
|
|
|
|
80471
|
|
|
10
|
|
|
|
|
550
|
|
8
|
10
|
|
|
10
|
|
71
|
use Carp qw/croak/; |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
2037
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub skip { |
11
|
1
|
|
|
1
|
0
|
10
|
my $class = shift; |
12
|
1
|
|
|
|
|
182
|
croak "Class '$class' needs to implement 'skip()'"; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import { |
16
|
5
|
|
|
5
|
|
772
|
my $class = shift; |
17
|
5
|
100
|
|
|
|
119
|
return if $class eq __PACKAGE__; |
18
|
|
|
|
|
|
|
|
19
|
4
|
|
|
|
|
27
|
my $skip = $class->skip(@_); |
20
|
4
|
100
|
|
|
|
57
|
return unless defined $skip; |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
|
|
7
|
my $ctx = context(); |
23
|
2
|
|
50
|
|
|
6053
|
$ctx->plan(0, SKIP => $skip || "No reason given."); |
24
|
0
|
|
|
|
|
|
$ctx->release; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |