/[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.5 by joko, Sun Nov 17 07:12:06 2002 UTC
# Line 3  Line 3 
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.5  2002/11/17 07:12:06  joko
7    #  + extended ::getProperties with argument "want_transactions"
8    #
9  #  Revision 1.4  2002/11/15 13:21:39  joko  #  Revision 1.4  2002/11/15 13:21:39  joko
10  #  + 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
11  #  #
# Line 47  package Data::Storage::Schema::Abstract; Line 50  package Data::Storage::Schema::Abstract;
50      my @args = ();      my @args = ();
51      @_ && (@args = @_);      @_ && (@args = @_);
52            
53        $logger->debug( __PACKAGE__ . "->new" );
54    
55      #my $self = { @_ };      #my $self = { @_ };
56    
57      # 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 60  package Data::Storage::Schema::Abstract;
60      # make hash from array      # make hash from array
61      my %args = @args_all;      my %args = @args_all;
62    
63      $logger->debug( __PACKAGE__ . "->new( @args_all )" );      #$logger->debug( __PACKAGE__ . "->new( @args_all )" );
64            
65      my $self = { %args };      my $self = { %args };
66      bless $self, $class;      bless $self, $class;
67    
68        #use Data::Dumper; print Dumper($self);
69    
70      # remember as which Class we are instantiated      # remember as which Class we are instantiated
71      $self->{invocant} = $invocant;      $self->{invocant} = $invocant;
72    
# Line 141  package Data::Storage::Schema::Abstract; Line 148  package Data::Storage::Schema::Abstract;
148            
149      my $schema_properties = {};      my $schema_properties = {};
150      if ($self->{invocant}->can('getProperties')) {      if ($self->{invocant}->can('getProperties')) {
151        $schema_properties = eval('return ' . $self->{invocant} . '::getProperties();');        # TODO: rework this! call by ref and/or do oo
152          #$schema_properties = eval('return ' . $self->{invocant} . '::getProperties();');
153          $schema_properties = eval('return ' . $self->{invocant} . '::getProperties($self->{want_transactions});');
154      }      }
155            
156      # build argument to be passed to "Tangram::Schema->new(...)"      # build argument to be passed to "Tangram::Schema->new(...)"

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

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