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