--- nfo/perl/libs/Data/Storage/Schema/Abstract.pm 2002/11/15 13:21:39 1.4 +++ nfo/perl/libs/Data/Storage/Schema/Abstract.pm 2002/11/17 07:21:47 1.6 @@ -1,8 +1,14 @@ ############################################### # -# $Id: Abstract.pm,v 1.4 2002/11/15 13:21:39 joko Exp $ +# $Id: Abstract.pm,v 1.6 2002/11/17 07:21:47 jonen Exp $ # # $Log: Abstract.pm,v $ +# Revision 1.6 2002/11/17 07:21:47 jonen +# + using Class::Tangram::import_schema() again for proper usage of its helper functions +# +# Revision 1.5 2002/11/17 07:12:06 joko +# + extended ::getProperties with argument "want_transactions" +# # Revision 1.4 2002/11/15 13:21:39 joko # + added capability to propagate global schema options from schema module to tangram schema # @@ -47,6 +53,8 @@ my @args = (); @_ && (@args = @_); + $logger->debug( __PACKAGE__ . "->new" ); + #my $self = { @_ }; # merge all entries from all hashes in args-array to single array (key, val, key, val) @@ -55,11 +63,13 @@ # make hash from array my %args = @args_all; - $logger->debug( __PACKAGE__ . "->new( @args_all )" ); + #$logger->debug( __PACKAGE__ . "->new( @args_all )" ); my $self = { %args }; bless $self, $class; + #use Data::Dumper; print Dumper($self); + # remember as which Class we are instantiated $self->{invocant} = $invocant; @@ -141,13 +151,16 @@ my $schema_properties = {}; if ($self->{invocant}->can('getProperties')) { - $schema_properties = eval('return ' . $self->{invocant} . '::getProperties();'); + # TODO: rework this! call by ref and/or do oo + #$schema_properties = eval('return ' . $self->{invocant} . '::getProperties();'); + $schema_properties = eval('return ' . $self->{invocant} . '::getProperties($self->{want_transactions});'); } # build argument to be passed to "Tangram::Schema->new(...)" my @classes; map { $logger->debug( __PACKAGE__ . "->_doinit: Initializing Class $_" ); + Class::Tangram::import_schema($_); # classname push @classes, $_; # schema