line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Tools::Condition; |
2
|
2
|
|
|
2
|
|
216534
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
55
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
84
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = "0.02"; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
13
|
use Carp (); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
27
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
806
|
use Test2::Compare::Condition(); |
|
2
|
|
|
|
|
5
|
|
|
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
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
180
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub condition (&) { |
21
|
11
|
|
|
11
|
1
|
11972
|
my @caller = caller; |
22
|
11
|
|
|
|
|
59
|
return Test2::Compare::Condition->new( |
23
|
|
|
|
|
|
|
file => $caller[1], |
24
|
|
|
|
|
|
|
lines => [$caller[2]], |
25
|
|
|
|
|
|
|
code => $_[0], |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |