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