line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::dbMan::MemPool; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
64
|
|
4
|
3
|
|
|
3
|
|
10
|
use locale; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
10
|
|
5
|
3
|
|
|
3
|
|
60
|
use POSIX; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
28
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
1; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
13
|
0
|
|
|
|
|
|
my $obj = bless { @_ }, $class; |
14
|
0
|
|
|
|
|
|
return $obj; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub set { |
18
|
0
|
|
|
0
|
0
|
|
my $obj = shift; |
19
|
0
|
|
|
|
|
|
my $name = shift; |
20
|
0
|
|
|
|
|
|
$obj->{$name} = shift; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub get { |
24
|
0
|
|
|
0
|
0
|
|
my $obj = shift; |
25
|
0
|
|
|
|
|
|
my $name = shift; |
26
|
0
|
0
|
|
|
|
|
return undef unless exists $obj->{$name}; |
27
|
0
|
|
|
|
|
|
return $obj->{$name}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub register { |
31
|
0
|
|
|
0
|
0
|
|
my $obj = shift; |
32
|
0
|
|
|
|
|
|
my $name = shift; |
33
|
0
|
|
|
|
|
|
++$obj->{-registers}->{$name}->{$_} for @_; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub deregister { |
37
|
0
|
|
|
0
|
0
|
|
my $obj = shift; |
38
|
0
|
|
|
|
|
|
my $name = shift; |
39
|
0
|
|
|
|
|
|
for (@_) { |
40
|
0
|
0
|
|
|
|
|
delete $obj->{-registers}->{$name}->{$_} unless --$obj->{-registers}->{$name}->{$_}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub get_register { |
45
|
0
|
|
|
0
|
0
|
|
my $obj = shift; |
46
|
0
|
|
|
|
|
|
my $name = shift; |
47
|
0
|
0
|
|
|
|
|
return () unless exists $obj->{-registers}; |
48
|
0
|
0
|
|
|
|
|
return () unless exists $obj->{-registers}->{$name}; |
49
|
0
|
|
|
|
|
|
return keys %{$obj->{-registers}->{$name}}; |
|
0
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |