line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
55
|
|
|
55
|
|
312
|
package Test::SharedFork::Scalar; |
|
55
|
|
|
|
|
107
|
|
|
55
|
|
|
|
|
1835
|
|
3
|
55
|
|
|
55
|
|
382
|
use strict; |
|
55
|
|
|
|
|
112
|
|
|
55
|
|
|
|
|
1899
|
|
4
|
55
|
|
|
55
|
|
285
|
use warnings; |
|
55
|
|
|
|
|
118
|
|
|
55
|
|
|
|
|
294093
|
|
5
|
|
|
|
|
|
|
use base 'Tie::Scalar'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# create new tied scalar |
8
|
55
|
|
|
55
|
|
343
|
sub TIESCALAR { |
9
|
55
|
50
|
|
|
|
233
|
my ($class, $share, $key) = @_; |
10
|
55
|
|
|
|
|
659
|
die "missing key" unless $key; |
11
|
|
|
|
|
|
|
bless { share => $share, key => $key }, $class; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
2544
|
|
|
2544
|
|
3730
|
sub FETCH { |
15
|
2544
|
|
|
|
|
13622
|
my $self = shift; |
16
|
2544
|
|
|
|
|
11626
|
my $lock = $self->{share}->get_lock(); |
17
|
|
|
|
|
|
|
$self->{share}->get($self->{key}); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
606
|
|
|
606
|
|
1342
|
sub STORE { |
21
|
606
|
|
|
|
|
1161
|
my ($self, $val) = @_; |
22
|
606
|
|
|
|
|
1982
|
my $share = $self->{share}; |
23
|
606
|
|
|
|
|
3042
|
my $lock = $self->{share}->get_lock(); |
24
|
|
|
|
|
|
|
$share->set($self->{key} => $val); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |