line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Salvation::TC::Type::Number::Integer; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1465
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
115
|
|
4
|
4
|
|
|
4
|
|
16
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
114
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
17
|
use base 'Salvation::TC::Type::Number'; |
|
4
|
|
|
|
|
27
|
|
|
4
|
|
|
|
|
677
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
17
|
use Salvation::TC::Exception::WrongType (); |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
376
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $re = qr/^[-+]?\d+$/; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub Check { |
13
|
|
|
|
|
|
|
|
14
|
51
|
|
|
51
|
1
|
52
|
my ( $class, $value ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
51
|
100
|
|
|
|
86
|
defined( $value ) || Salvation::TC::Exception::WrongType -> throw( 'type' => 'Integer', 'value' => 'UNDEFINED' ); |
17
|
49
|
100
|
|
|
|
369
|
( $value =~ $re ) || Salvation::TC::Exception::WrongType -> throw( 'type' => 'Number::Integer', 'value' => $value ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
__END__ |