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 |
# |
# |
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) |
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 |
|
|
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(...)" |