1 |
## -------------------------------------------------------------------------------- |
2 |
## $Id: Query.pm,v 1.4 2003/02/20 18:42:45 joko Exp $ |
3 |
## -------------------------------------------------------------------------------- |
4 |
## $Log: Query.pm,v $ |
5 |
## Revision 1.4 2003/02/20 18:42:45 joko |
6 |
## renamed modules |
7 |
## |
8 |
## Revision 1.3 2003/02/09 04:50:32 joko |
9 |
## - purged old code |
10 |
## |
11 |
## Revision 1.2 2002/12/27 16:02:39 joko |
12 |
## - object constructor |
13 |
## + now utilizing DesignPattern::Object |
14 |
## + use Data::Query::Element::LV |
15 |
## |
16 |
## Revision 1.1 2002/12/23 04:23:24 joko |
17 |
## + initial check-in |
18 |
## |
19 |
## -------------------------------------------------------------------------------- |
20 |
|
21 |
|
22 |
package Data::Query; |
23 |
|
24 |
use strict; |
25 |
use warnings; |
26 |
|
27 |
use base qw( |
28 |
DesignPattern::Object |
29 |
DesignPattern::Logger |
30 |
); |
31 |
|
32 |
|
33 |
use Data::Dumper; |
34 |
|
35 |
use Regexp::Group; |
36 |
use Data::Mungle::Compare::Struct qw( isEmpty ); |
37 |
|
38 |
use Data::Query::Element::LV; |
39 |
|
40 |
sub _init { |
41 |
my $self = shift; |
42 |
|
43 |
if ($self->{options}) { |
44 |
$self->{__options} = $self->{options}; |
45 |
delete $self->{options}; |
46 |
my $possible_keys = $self->{__options}->getPossibleOptionKeys(); |
47 |
my $options = $self->{__options}->getOptions(); |
48 |
foreach (@$possible_keys) { |
49 |
$self->{$_} = Data::Query::Element::LV->new($options->{$_}); |
50 |
} |
51 |
} |
52 |
|
53 |
} |
54 |
|
55 |
sub getOptions { |
56 |
my $self = shift; |
57 |
return $self->{__options}->getOptions(); |
58 |
} |
59 |
|
60 |
1; |