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