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