line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Deep::Cond; |
2
|
2
|
|
|
2
|
|
77679
|
use 5.008_001; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
87
|
|
3
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
65
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
104
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
864
|
use Test::Deep (); |
|
2
|
|
|
|
|
12013
|
|
|
2
|
|
|
|
|
41
|
|
9
|
2
|
|
|
2
|
|
1808
|
use Test::Deep::Cmp; |
|
2
|
|
|
|
|
1730
|
|
|
2
|
|
|
|
|
11
|
|
10
|
2
|
|
|
2
|
|
1747
|
use Exporter::Lite; |
|
2
|
|
|
|
|
1424
|
|
|
2
|
|
|
|
|
12
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @EXPORT = qw(cond); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub cond(&) { |
15
|
2
|
|
|
2
|
1
|
3976
|
my ($code) = @_; |
16
|
2
|
|
|
|
|
29
|
__PACKAGE__->new($code); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub init { |
20
|
2
|
|
|
2
|
0
|
19
|
my ($self, $code) = @_; |
21
|
2
|
|
|
|
|
92
|
$self->{code} = $code; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub descend { |
25
|
2
|
|
|
2
|
0
|
16312
|
my ($self, $got) = @_; |
26
|
2
|
|
|
|
|
9
|
local *_ = \$got; |
27
|
2
|
|
|
|
|
10
|
$self->{code}->(); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub diagnostics { |
31
|
1
|
|
|
1
|
0
|
404
|
my $self = shift; |
32
|
1
|
|
|
|
|
3
|
my ($where, $last) = @_; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
5
|
my $data = Test::Deep::render_val($last->{got}); |
35
|
1
|
|
|
|
|
15
|
my $diag = "$where return $data"; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
__END__ |