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