line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Tools::Condition; |
2
|
2
|
|
|
2
|
|
206709
|
use strict; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
64
|
|
3
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
85
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = "0.01"; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
12
|
use Carp (); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
31
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
631
|
use Test2::Compare::Condition(); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
111
|
|
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
|
|
18
|
use Exporter 'import'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
240
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub condition (&) { |
21
|
11
|
|
|
11
|
1
|
15756
|
my @caller = caller; |
22
|
11
|
|
|
|
|
50
|
return Test2::Compare::Condition->new( |
23
|
|
|
|
|
|
|
file => $caller[1], |
24
|
|
|
|
|
|
|
lines => [$caller[2]], |
25
|
|
|
|
|
|
|
code => $_[0], |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |