line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
12
|
use v5.12.0; |
|
1
|
|
|
|
|
3
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
3
|
|
|
|
|
|
|
package Data::Rx::CoreType::one 0.200008; |
4
|
|
|
|
|
|
|
# ABSTRACT: the Rx //one type |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use parent 'Data::Rx::CoreType'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub assert_valid { |
9
|
54
|
|
|
54
|
0
|
11528
|
my ($self, $value) = @_; |
10
|
|
|
|
|
|
|
|
11
|
54
|
100
|
|
|
|
140
|
if (! defined $value) { |
12
|
1
|
|
|
|
|
7
|
$self->fail({ |
13
|
|
|
|
|
|
|
error => [ qw(type) ], |
14
|
|
|
|
|
|
|
message => "found value is undef", |
15
|
|
|
|
|
|
|
value => $value, |
16
|
|
|
|
|
|
|
}); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
return 1 unless ref $value and ! ( |
20
|
|
|
|
|
|
|
eval { $value->isa('JSON::XS::Boolean') } |
21
|
|
|
|
|
|
|
or |
22
|
|
|
|
|
|
|
eval { $value->isa('JSON::PP::Boolean') } |
23
|
|
|
|
|
|
|
or |
24
|
53
|
100
|
66
|
|
|
146
|
eval { $value->isa('boolean') } |
|
|
|
100
|
|
|
|
|
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
26
|
|
|
|
|
167
|
$self->fail({ |
28
|
|
|
|
|
|
|
error => [ qw(type) ], |
29
|
|
|
|
|
|
|
message => "found value is a reference/container type", |
30
|
|
|
|
|
|
|
value => $value, |
31
|
|
|
|
|
|
|
}); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
70
|
|
|
70
|
0
|
204
|
sub subname { 'one' } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |