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
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
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
|
2
|
|
|
2
|
|
3
|
my( $self, $value ) = @_;
|
17
|
2
|
|
|
|
|
10
|
$self->{'setter'}->($self->{'object'}, $value);
|
18
|
|
|
|
|
|
|
}
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub FETCH
|
21
|
|
|
|
|
|
|
{
|
22
|
2
|
|
|
2
|
|
25
|
my( $self ) = @_;
|
23
|
2
|
|
|
|
|
9
|
return $self->{'getter'}->($self->{'object'});
|
24
|
|
|
|
|
|
|
}
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |