/[cvs]/nfo/perl/libs/Data/Query.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Query.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Mon Dec 23 04:23:24 2002 UTC revision 1.2 by joko, Fri Dec 27 16:02:39 2002 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ##  --------------------------------------------------------------------------------  ##  --------------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
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  ##  Revision 1.1  2002/12/23 04:23:24  joko
11  ##  + initial check-in  ##  + initial check-in
12  ##  ##
# Line 13  package Data::Query; Line 18  package Data::Query;
18  use strict;  use strict;
19  use warnings;  use warnings;
20    
21    use base 'DesignPattern::Object';
22  use base 'DesignPattern::Object::Logger';  use base 'DesignPattern::Object::Logger';
23    
24    
# Line 22  use Regexp::Group; Line 28  use Regexp::Group;
28  use libp qw( mkObject );  use libp qw( mkObject );
29  use Data::Compare::Struct qw( isEmpty );  use Data::Compare::Struct qw( isEmpty );
30    
31  # ------------    common perl object constructor    ------------  use Data::Query::Element::LV;
 sub new {  
   my $invocant = shift;  
   my $class = ref($invocant) || $invocant;  
   my @args = ();  
   @_ && (@args = @_);  
   #$logger->debug( __PACKAGE__ . "->new( @args )" );      # this is not "common"!  
   my $self = { @_ };  
   bless $self, $class;  
   $self->{caller} = caller;  
     
   #print Dumper(caller(2));  
   #exit;  
     
   $self->_init();  
   return $self;  
 }    
32    
33  sub _init {  sub _init {
34    my $self = shift;    my $self = shift;
35        
36    #print Dumper($self->{options}->getOptions());    if ($self->{options}) {
37        $self->{__options} = $self->{options};
38        delete $self->{options};
39        my $possible_keys = $self->{__options}->getPossibleOptionKeys();
40        my $options = $self->{__options}->getOptions();
41        foreach (@$possible_keys) {
42          $self->{$_} = Data::Query::Element::LV->new($options->{$_});
43        }
44      }
45    
46  }  }
47    
48  sub getOptions {  sub getOptions {
49    my $self = shift;    my $self = shift;
50    return $self->{options}->getOptions();    return $self->{__options}->getOptions();
51  }  }
52    
53  1;  1;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed