| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Apache::ASP::CGI::Table; |
|
3
|
|
|
|
|
|
|
|
|
4
|
14
|
|
|
14
|
|
220
|
use Carp qw(confess); |
|
|
14
|
|
|
|
|
162
|
|
|
|
14
|
|
|
|
|
335
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=pod |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Apache::ASP::CGI::Table |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Layer for compatibility with Apache::Table objects |
|
15
|
|
|
|
|
|
|
while running in CGI or command line / test mode. |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
|
20
|
95
|
|
|
95
|
0
|
869
|
my $class = shift; |
|
21
|
95
|
|
|
|
|
1462
|
bless {}, $class; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub set { |
|
25
|
107
|
|
|
107
|
0
|
1165
|
my($self, $key, $value) = @_; |
|
26
|
107
|
50
|
|
|
|
1131
|
defined($key) || confess("no key to set value $value"); |
|
27
|
107
|
|
|
|
|
2556
|
$self->{$key} = $value; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
1184
|
|
|
1184
|
0
|
16580
|
sub get { shift()->{shift()}; } |
|
31
|
0
|
|
|
0
|
0
|
0
|
sub unset { delete shift()->{shift()} }; |
|
32
|
0
|
|
|
0
|
0
|
0
|
sub clear { %{shift()} = (); }; |
|
|
0
|
|
|
|
|
0
|
|
|
33
|
|
|
|
|
|
|
sub add { |
|
34
|
10
|
|
|
10
|
0
|
126
|
my($self, $name, $value) = @_; |
|
35
|
|
|
|
|
|
|
|
|
36
|
10
|
|
|
|
|
101
|
my $old_value = $self->{$name}; |
|
37
|
10
|
100
|
|
|
|
207
|
if(ref $old_value) { |
|
|
|
100
|
|
|
|
|
|
|
38
|
2
|
|
|
|
|
26
|
push(@$old_value, $value); |
|
39
|
|
|
|
|
|
|
} elsif(defined $old_value) { |
|
40
|
2
|
|
|
|
|
29
|
$self->{$name} = [$old_value, $value]; |
|
41
|
|
|
|
|
|
|
} else { |
|
42
|
6
|
|
|
|
|
80
|
$self->{$name} = $value; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
0
|
|
sub merge { die("merge not implemented"); } |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
|
49
|
|
|
|
|
|
|
|