line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
3
|
|
|
|
|
|
|
package Data::Rx::CoreType::int; |
4
|
|
|
|
|
|
|
# ABSTRACT: the Rx //int type |
5
|
|
|
|
|
|
|
$Data::Rx::CoreType::int::VERSION = '0.200006'; |
6
|
1
|
|
|
1
|
|
4
|
use parent 'Data::Rx::CoreType::num'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
54
|
|
|
54
|
0
|
203
|
sub subname { 'int' } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub __type_fail { |
11
|
188
|
|
|
188
|
|
435
|
my ($self, $value) = @_; |
12
|
188
|
|
|
|
|
1695
|
$self->fail({ |
13
|
|
|
|
|
|
|
error => [ qw(type) ], |
14
|
|
|
|
|
|
|
message => "value is not an integer", |
15
|
|
|
|
|
|
|
value => $value, |
16
|
|
|
|
|
|
|
}); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _value_is_of_type { |
20
|
217
|
|
|
217
|
|
387
|
my ($self, $value) = @_; |
21
|
|
|
|
|
|
|
|
22
|
217
|
100
|
|
|
|
825
|
return unless $self->SUPER::_value_is_of_type($value); |
23
|
164
|
|
|
|
|
697
|
return ($value == int $value); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |