line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: An Integer Object for Perl 5 |
2
|
|
|
|
|
|
|
package Data::Object::Integer; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
652
|
use 5.10.0; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
651
|
use Moo 'with'; |
|
1
|
|
|
|
|
13602
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
1319
|
use Scalar::Util 'blessed'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
77
|
|
8
|
1
|
|
|
1
|
|
670
|
use Types::Standard 'Int'; |
|
1
|
|
|
|
|
58060
|
|
|
1
|
|
|
|
|
13
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'Data::Object::Role::Integer'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.02'; # VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
16
|
0
|
|
|
|
|
|
my $data = shift; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
0
|
|
|
|
$class = ref($class) || $class; |
19
|
0
|
0
|
0
|
|
|
|
$data = Int->($data) |
20
|
|
|
|
|
|
|
unless blessed($data) && $data->isa($class); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
return bless \$data, $class; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |