line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Property::RW::Lazy::CustomSet;
|
2
|
1
|
|
|
1
|
|
4
|
use strict; use warnings FATAL => 'all';
|
|
1
|
|
|
1
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
4
|
use parent 'Class::Property::RW';
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub TIESCALAR
|
6
|
|
|
|
|
|
|
{
|
7
|
1
|
|
|
1
|
|
2
|
my( $class, $field, $init, $setter, $flag_ref ) = @_;
|
8
|
1
|
|
|
|
|
5
|
return bless \{
|
9
|
|
|
|
|
|
|
'field' => $field
|
10
|
|
|
|
|
|
|
, 'init' => $init
|
11
|
|
|
|
|
|
|
, 'setter' => $setter
|
12
|
|
|
|
|
|
|
, 'flag_ref' => $flag_ref
|
13
|
|
|
|
|
|
|
}, $class;
|
14
|
|
|
|
|
|
|
}
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub STORE
|
17
|
|
|
|
|
|
|
{
|
18
|
0
|
|
|
0
|
|
|
my( $self, $value ) = @_;
|
19
|
0
|
|
|
|
|
|
${$self}->{'setter'}->(${$self}->{'object'}, $value );
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
${${$self}->{'flag_ref'}}++;
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return;
|
22
|
|
|
|
|
|
|
}
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub FETCH
|
25
|
|
|
|
|
|
|
{
|
26
|
0
|
|
|
0
|
|
|
my( $self ) = @_;
|
27
|
|
|
|
|
|
|
|
28
|
0
|
0
|
|
|
|
|
if( not ${${$self}->{'flag_ref'}} )
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
{
|
30
|
0
|
|
|
|
|
|
${$self}->{'setter'}->(${$self}->{'object'}, ${$self}->{'init'}->(${$self}->{'object'}));
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
${${$self}->{'flag_ref'}}++;
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
}
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return ${$self}->{'object'}->{${$self}->{'field'}};
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
}
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |