line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Require; |
2
|
10
|
|
|
10
|
|
509
|
use strict; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
284
|
|
3
|
10
|
|
|
10
|
|
54
|
use warnings; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
478
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000153'; |
6
|
|
|
|
|
|
|
|
7
|
10
|
|
|
10
|
|
654
|
use Test2::API qw/context/; |
|
10
|
|
|
|
|
72840
|
|
|
10
|
|
|
|
|
510
|
|
8
|
10
|
|
|
10
|
|
65
|
use Carp qw/croak/; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
1794
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub skip { |
11
|
1
|
|
|
1
|
0
|
9
|
my $class = shift; |
12
|
1
|
|
|
|
|
223
|
croak "Class '$class' needs to implement 'skip()'"; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import { |
16
|
5
|
|
|
5
|
|
736
|
my $class = shift; |
17
|
5
|
100
|
|
|
|
126
|
return if $class eq __PACKAGE__; |
18
|
|
|
|
|
|
|
|
19
|
4
|
|
|
|
|
19
|
my $skip = $class->skip(@_); |
20
|
4
|
100
|
|
|
|
55
|
return unless defined $skip; |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
|
|
13
|
my $ctx = context(); |
23
|
2
|
|
50
|
|
|
5517
|
$ctx->plan(0, SKIP => $skip || "No reason given."); |
24
|
0
|
|
|
|
|
|
$ctx->release; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |