line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Tools::Condition; |
2
|
2
|
|
|
2
|
|
219285
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
57
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
83
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = "0.03"; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
12
|
use Carp (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
27
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
816
|
use Test2::Compare::Condition(); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
103
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
%Carp::Internal = ( |
12
|
|
|
|
|
|
|
%Carp::Internal, |
13
|
|
|
|
|
|
|
'Test2::Tools::Condition' => 1, |
14
|
|
|
|
|
|
|
'Test2::Compare::Condition' => 1, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our @EXPORT = qw/condition/; |
18
|
2
|
|
|
2
|
|
13
|
use Exporter 'import'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
182
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub condition (&) { |
21
|
11
|
|
|
11
|
1
|
11875
|
my @caller = caller; |
22
|
11
|
|
|
|
|
62
|
return Test2::Compare::Condition->new( |
23
|
|
|
|
|
|
|
file => $caller[1], |
24
|
|
|
|
|
|
|
lines => [$caller[2]], |
25
|
|
|
|
|
|
|
code => $_[0], |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |