line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBomb::Value::Key; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
DBomb::Value::Key - The values for a DBomb::Meta::Key. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=cut |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
3441
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
44
|
|
12
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
69
|
|
13
|
|
|
|
|
|
|
our $VERSION = '$Revision: 1.8 $'; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
5
|
use base qw(DBomb::Value); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
667
|
|
16
|
1
|
|
|
1
|
|
6
|
use Carp qw(carp croak); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
17
|
1
|
|
|
1
|
|
6
|
use Carp::Assert; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
18
|
|
|
|
|
|
|
use Class::MethodMaker |
19
|
1
|
|
|
|
|
12
|
'new_with_init' => 'new', |
20
|
|
|
|
|
|
|
'get_set' => [ qw(value_list), ## [ value,...] |
21
|
|
|
|
|
|
|
qw(key_info), ## Key object |
22
|
|
|
|
|
|
|
], |
23
|
1
|
|
|
1
|
|
160
|
; |
|
1
|
|
|
|
|
2
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
## new Key($key_info,[values...]) |
27
|
|
|
|
|
|
|
sub init |
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
0
|
0
|
|
my ($self,$key_info,$value) = @_; |
30
|
0
|
|
|
|
|
|
assert(UNIVERSAL::isa($self,__PACKAGE__)); |
31
|
0
|
|
|
|
|
|
assert(@_ == 3, 'parameter count'); |
32
|
0
|
|
|
|
|
|
assert(UNIVERSAL::isa($key_info , 'DBomb::Meta::Key')); |
33
|
0
|
|
|
|
|
|
assert(UNIVERSAL::isa($value , 'ARRAY')); |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
$self->key_info($key_info); |
36
|
0
|
|
|
|
|
|
$self->value_list($value); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
## mk_where |
41
|
|
|
|
|
|
|
sub mk_where |
42
|
|
|
|
|
|
|
{ |
43
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
44
|
0
|
|
|
|
|
|
assert(@_ == 0, 'parameter count'); |
45
|
0
|
|
|
|
|
|
$self->key_info->where(@{$self->value_list}); |
|
0
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
__END__ |