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