/[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.3 by joko, Sun Feb 9 04:50:32 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ##  --------------------------------------------------------------------------------  ##  --------------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
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  ##  Revision 1.1  2002/12/23 04:23:24  joko
14  ##  + initial check-in  ##  + initial check-in
15  ##  ##
# Line 13  package Data::Query; Line 21  package Data::Query;
21  use strict;  use strict;
22  use warnings;  use warnings;
23    
24    use base 'DesignPattern::Object';
25  use base 'DesignPattern::Object::Logger';  use base 'DesignPattern::Object::Logger';
26    
27    
28  use Data::Dumper;  use Data::Dumper;
29    
30  use Regexp::Group;  use Regexp::Group;
 use libp qw( mkObject );  
31  use Data::Compare::Struct qw( isEmpty );  use Data::Compare::Struct qw( isEmpty );
32    
33  # ------------    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;  
 }    
34    
35  sub _init {  sub _init {
36    my $self = shift;    my $self = shift;
37        
38    #print Dumper($self->{options}->getOptions());    if ($self->{options}) {
39        $self->{__options} = $self->{options};
40        delete $self->{options};
41        my $possible_keys = $self->{__options}->getPossibleOptionKeys();
42        my $options = $self->{__options}->getOptions();
43        foreach (@$possible_keys) {
44          $self->{$_} = Data::Query::Element::LV->new($options->{$_});
45        }
46      }
47    
48  }  }
49    
50  sub getOptions {  sub getOptions {
51    my $self = shift;    my $self = shift;
52    return $self->{options}->getOptions();    return $self->{__options}->getOptions();
53  }  }
54    
55  1;  1;

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

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