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