line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IPC::Shm::Tied::SCALAR; |
2
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
279
|
|
3
|
6
|
|
|
6
|
|
31
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
388
|
|
4
|
6
|
|
|
6
|
|
31
|
use Carp; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
390
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# Copyright (c) 2014 by Kevin Cody-Little |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# This code may be modified or redistributed under the terms |
10
|
|
|
|
|
|
|
# of either the Artistic or GNU General Public licenses, at |
11
|
|
|
|
|
|
|
# the modifier or redistributor's discretion. |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
IPC::Shm::Tied::HASH |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This class is part of the IPC::Shm implementation. You should not be using it directly. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Loaded from IPC::Shm::Tied, so don't reload it |
25
|
6
|
|
|
6
|
|
27
|
use vars qw( @ISA ); |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
454
|
|
26
|
|
|
|
|
|
|
@ISA = qw( IPC::Shm::Tied ); |
27
|
|
|
|
|
|
|
|
28
|
6
|
|
|
6
|
|
37
|
use IPC::Shm::Make; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
2593
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub EMPTY { |
32
|
7
|
|
|
7
|
1
|
36
|
return \undef; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub TIESCALAR { |
36
|
8
|
|
|
8
|
|
15
|
my ( $class, $this ) = @_; |
37
|
|
|
|
|
|
|
|
38
|
8
|
|
|
|
|
37
|
return bless $this, $class; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub FETCH { |
42
|
35
|
|
|
35
|
|
1112
|
my ( $this ) = @_; |
43
|
|
|
|
|
|
|
|
44
|
35
|
|
|
|
|
154
|
my $locked = $this->readlock; |
45
|
|
|
|
|
|
|
|
46
|
35
|
|
|
|
|
664
|
$this->fetch; |
47
|
|
|
|
|
|
|
|
48
|
35
|
50
|
|
|
|
4276
|
$this->unlock if $locked; |
49
|
|
|
|
|
|
|
|
50
|
35
|
|
|
|
|
438
|
my $rv = ${$this->vcache}; |
|
35
|
|
|
|
|
101
|
|
51
|
|
|
|
|
|
|
|
52
|
35
|
100
|
|
|
|
180
|
return ref( $rv ) ? getback( $rv ) : $rv; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub STORE { |
56
|
13
|
|
|
13
|
|
1986
|
my ( $this, $value ) = @_; |
57
|
|
|
|
|
|
|
|
58
|
13
|
|
|
|
|
60
|
makeshm( \$value ); |
59
|
|
|
|
|
|
|
|
60
|
13
|
|
|
|
|
90
|
my $locked = $this->writelock; |
61
|
|
|
|
|
|
|
|
62
|
13
|
|
|
|
|
538
|
$this->fetch; |
63
|
13
|
|
|
|
|
1581
|
my $oldval = ${$this->vcache}; |
|
13
|
|
|
|
|
39
|
|
64
|
|
|
|
|
|
|
|
65
|
13
|
|
|
|
|
39
|
$this->vcache( \$value ); |
66
|
13
|
|
|
|
|
60
|
$this->flush; |
67
|
|
|
|
|
|
|
|
68
|
13
|
50
|
|
|
|
3152
|
$this->unlock if $locked; |
69
|
|
|
|
|
|
|
|
70
|
13
|
100
|
100
|
|
|
265
|
$this->standin_discard( $oldval ) if ( $oldval and ref( $oldval ) ); |
71
|
|
|
|
|
|
|
|
72
|
13
|
|
|
|
|
87
|
return $value; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub CLEAR { |
76
|
3
|
|
|
3
|
|
7
|
my ( $this ) = @_; |
77
|
|
|
|
|
|
|
|
78
|
3
|
|
|
|
|
12
|
my $locked = $this->writelock; |
79
|
|
|
|
|
|
|
|
80
|
3
|
|
|
|
|
45
|
$this->fetch; |
81
|
3
|
|
|
|
|
129
|
my $oldval = ${$this->vcache}; |
|
3
|
|
|
|
|
8
|
|
82
|
|
|
|
|
|
|
|
83
|
3
|
|
|
|
|
11
|
$this->vcache( $this->EMPTY ); |
84
|
3
|
|
|
|
|
16
|
$this->flush; |
85
|
|
|
|
|
|
|
|
86
|
3
|
100
|
|
|
|
615
|
$this->unlock if $locked; |
87
|
|
|
|
|
|
|
|
88
|
3
|
50
|
66
|
|
|
29
|
$this->standin_discard( $oldval ) if ( $oldval and ref( $oldval ) ); |
89
|
|
|
|
|
|
|
|
90
|
3
|
|
|
|
|
11
|
return 1; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 AUTHOR |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Kevin Cody-Little |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
1; |