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