/[cvs]/nfo/perl/libs/Data/Storage/Schema/Abstract.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Storage/Schema/Abstract.pm

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

revision 1.4 by joko, Fri Nov 15 13:21:39 2002 UTC revision 1.6 by jonen, Sun Nov 17 07:21:47 2002 UTC
# Line 3  Line 3 
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.6  2002/11/17 07:21:47  jonen
7    #  + using Class::Tangram::import_schema() again for proper usage of its helper functions
8    #
9    #  Revision 1.5  2002/11/17 07:12:06  joko
10    #  + extended ::getProperties with argument "want_transactions"
11    #
12  #  Revision 1.4  2002/11/15 13:21:39  joko  #  Revision 1.4  2002/11/15 13:21:39  joko
13  #  + added capability to propagate global schema options from schema module to tangram schema  #  + added capability to propagate global schema options from schema module to tangram schema
14  #  #
# Line 47  package Data::Storage::Schema::Abstract; Line 53  package Data::Storage::Schema::Abstract;
53      my @args = ();      my @args = ();
54      @_ && (@args = @_);      @_ && (@args = @_);
55            
56        $logger->debug( __PACKAGE__ . "->new" );
57    
58      #my $self = { @_ };      #my $self = { @_ };
59    
60      # merge all entries from all hashes in args-array to single array (key, val, key, val)      # merge all entries from all hashes in args-array to single array (key, val, key, val)
# Line 55  package Data::Storage::Schema::Abstract; Line 63  package Data::Storage::Schema::Abstract;
63      # make hash from array      # make hash from array
64      my %args = @args_all;      my %args = @args_all;
65    
66      $logger->debug( __PACKAGE__ . "->new( @args_all )" );      #$logger->debug( __PACKAGE__ . "->new( @args_all )" );
67            
68      my $self = { %args };      my $self = { %args };
69      bless $self, $class;      bless $self, $class;
70    
71        #use Data::Dumper; print Dumper($self);
72    
73      # remember as which Class we are instantiated      # remember as which Class we are instantiated
74      $self->{invocant} = $invocant;      $self->{invocant} = $invocant;
75    
# Line 141  package Data::Storage::Schema::Abstract; Line 151  package Data::Storage::Schema::Abstract;
151            
152      my $schema_properties = {};      my $schema_properties = {};
153      if ($self->{invocant}->can('getProperties')) {      if ($self->{invocant}->can('getProperties')) {
154        $schema_properties = eval('return ' . $self->{invocant} . '::getProperties();');        # TODO: rework this! call by ref and/or do oo
155          #$schema_properties = eval('return ' . $self->{invocant} . '::getProperties();');
156          $schema_properties = eval('return ' . $self->{invocant} . '::getProperties($self->{want_transactions});');
157      }      }
158            
159      # build argument to be passed to "Tangram::Schema->new(...)"      # build argument to be passed to "Tangram::Schema->new(...)"
160      my @classes;      my @classes;
161      map {      map {
162        $logger->debug( __PACKAGE__ . "->_doinit: Initializing Class $_" );        $logger->debug( __PACKAGE__ . "->_doinit: Initializing Class $_" );
163          Class::Tangram::import_schema($_);
164        # classname        # classname
165        push @classes, $_;        push @classes, $_;
166        # schema        # schema

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

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