line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Property::RW;
|
2
|
1
|
|
|
1
|
|
539
|
use strict; use warnings FATAL => 'all';
|
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
44
|
|
3
|
1
|
|
|
1
|
|
8
|
use Scalar::Util 'weaken';
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
379
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
#
|
6
|
|
|
|
|
|
|
# This package is prototype. It has no use by itself
|
7
|
|
|
|
|
|
|
#
|
8
|
|
|
|
|
|
|
sub TIESCALAR
|
9
|
|
|
|
|
|
|
{
|
10
|
4
|
|
|
4
|
|
5
|
my( $class, $field ) = @_;
|
11
|
4
|
|
|
|
|
15
|
return bless {
|
12
|
|
|
|
|
|
|
'field' => $field
|
13
|
|
|
|
|
|
|
}, $class;
|
14
|
|
|
|
|
|
|
}
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub STORE
|
17
|
|
|
|
|
|
|
{
|
18
|
5
|
|
|
5
|
|
7
|
my $self = shift;
|
19
|
5
|
|
|
|
|
14
|
$self->{'object'}->{$self->{'field'}} = shift;
|
20
|
5
|
|
|
|
|
13
|
return;
|
21
|
|
|
|
|
|
|
}
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub FETCH
|
24
|
|
|
|
|
|
|
{
|
25
|
7
|
|
|
7
|
|
87
|
my( $self ) = @_;
|
26
|
7
|
|
|
|
|
21
|
return $self->{'object'}->{$self->{'field'}};
|
27
|
|
|
|
|
|
|
}
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub DESTROY
|
30
|
|
|
|
|
|
|
{
|
31
|
0
|
|
|
0
|
|
0
|
my $self = shift;
|
32
|
0
|
|
|
|
|
0
|
$self = undef;
|
33
|
0
|
|
|
|
|
0
|
return;
|
34
|
|
|
|
|
|
|
}
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub set_object
|
37
|
|
|
|
|
|
|
{
|
38
|
39
|
|
|
39
|
0
|
43
|
my $self = shift;
|
39
|
39
|
|
|
|
|
83
|
$self->{'object'} = shift;
|
40
|
39
|
|
|
|
|
117
|
weaken($self->{'object'});
|
41
|
|
|
|
|
|
|
}
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |