line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
3
|
|
|
|
|
|
|
package Data::Rx::CoreType::one; |
4
|
|
|
|
|
|
|
# ABSTRACT: the Rx //one type |
5
|
|
|
|
|
|
|
$Data::Rx::CoreType::one::VERSION = '0.200006'; |
6
|
1
|
|
|
1
|
|
6
|
use parent 'Data::Rx::CoreType'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub assert_valid { |
9
|
54
|
|
|
54
|
0
|
13050
|
my ($self, $value) = @_; |
10
|
|
|
|
|
|
|
|
11
|
54
|
100
|
|
|
|
142
|
if (! defined $value) { |
12
|
1
|
|
|
|
|
13
|
$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
|
|
|
167
|
eval { $value->isa('boolean') } |
|
|
|
100
|
|
|
|
|
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
26
|
|
|
|
|
210
|
$self->fail({ |
28
|
|
|
|
|
|
|
error => [ qw(type) ], |
29
|
|
|
|
|
|
|
message => "found value is a reference/container type", |
30
|
|
|
|
|
|
|
value => $value, |
31
|
|
|
|
|
|
|
}); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
54
|
|
|
54
|
0
|
184
|
sub subname { 'one' } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |