line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
13
|
use strict; use warnings; |
|
2
|
|
|
2
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
64
|
|
2
|
|
|
|
|
|
|
package immutable::base; |
3
|
2
|
|
|
2
|
|
10
|
use Scalar::Util 'refaddr'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
402
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
|
|
|
|
|
|
q{""} => sub { |
7
|
4
|
|
|
4
|
|
512
|
my ($self) = @_; |
8
|
4
|
|
|
|
|
7
|
"<${\ ref($self)} ${\ $self->size} ${\ refaddr $self}>"; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
53
|
|
9
|
|
|
|
|
|
|
}, |
10
|
|
|
|
|
|
|
q{0+} => sub { |
11
|
1
|
|
|
1
|
|
7
|
$_[0]->size; |
12
|
|
|
|
|
|
|
}, |
13
|
|
|
|
|
|
|
q{bool} => sub { |
14
|
6
|
|
|
6
|
|
313
|
!! $_[0]->size; |
15
|
|
|
|
|
|
|
}, |
16
|
2
|
|
|
2
|
|
14
|
fallback => 1; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
30
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub id { |
19
|
8
|
|
|
8
|
0
|
1611
|
refaddr($_[0]); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub is_empty { |
23
|
6
|
|
|
6
|
0
|
1085
|
$_[0]->size == 0; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |