line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Property::RO::CustomGet;
|
2
|
1
|
|
|
1
|
|
5
|
use strict; use warnings FATAL => 'all';
|
|
1
|
|
|
1
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
|
1
|
|
|
|
|
38
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
3
|
1
|
|
|
1
|
|
6
|
use parent 'Class::Property::RO';
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub TIESCALAR
|
6
|
|
|
|
|
|
|
{
|
7
|
0
|
|
|
0
|
|
|
my( $class, $object, $field, $getter ) = @_;
|
8
|
0
|
|
|
|
|
|
return bless \{
|
9
|
|
|
|
|
|
|
'object' => $object
|
10
|
|
|
|
|
|
|
, 'field' => $field
|
11
|
|
|
|
|
|
|
, 'getter' => $getter
|
12
|
|
|
|
|
|
|
}, $class;
|
13
|
|
|
|
|
|
|
}
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub FETCH
|
16
|
|
|
|
|
|
|
{
|
17
|
0
|
|
|
0
|
|
|
my( $self ) = @_;
|
18
|
0
|
|
|
|
|
|
return ${$self}->{'getter'}->(${$self}->{'object'});
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
}
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |