line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
49
|
use v5.12.0; |
|
1
|
|
|
|
|
3
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
3
|
|
|
|
|
|
|
package Data::Rx::CoreType::bool 0.200008; |
4
|
|
|
|
|
|
|
# ABSTRACT: the Rx //bool type |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use parent 'Data::Rx::CoreType'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub assert_valid { |
9
|
147
|
|
|
147
|
0
|
3310
|
my ($self, $value) = @_; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
return 1 if ( |
12
|
|
|
|
|
|
|
defined($value) |
13
|
|
|
|
|
|
|
and ref($value) |
14
|
|
|
|
|
|
|
and ( |
15
|
|
|
|
|
|
|
eval { $value->isa('JSON::XS::Boolean') } |
16
|
|
|
|
|
|
|
or |
17
|
|
|
|
|
|
|
eval { $value->isa('JSON::PP::Boolean') } |
18
|
|
|
|
|
|
|
or |
19
|
147
|
50
|
100
|
|
|
658
|
eval { $value->isa('boolean') } |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
20
|
|
|
|
|
|
|
) |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
118
|
|
|
|
|
635
|
$self->fail({ |
24
|
|
|
|
|
|
|
error => [ qw(type) ], |
25
|
|
|
|
|
|
|
message => "found value was not a bool", |
26
|
|
|
|
|
|
|
value => $value, |
27
|
|
|
|
|
|
|
}); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
70
|
|
|
70
|
0
|
248
|
sub subname { 'bool' } |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |