2 |
## $Id$ |
## $Id$ |
3 |
## ------------------------------------------------------------------------ |
## ------------------------------------------------------------------------ |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.19 2003/06/25 22:53:58 joko |
6 |
|
## don't disconnect automagically |
7 |
|
## |
8 |
|
## Revision 1.18 2003/06/06 03:40:57 joko |
9 |
|
## disabled autovivifying of arguments as attributes |
10 |
|
## |
11 |
|
## Revision 1.17 2003/05/13 07:58:49 joko |
12 |
|
## fix: die if methodname is empty |
13 |
|
## fixes to log-string |
14 |
|
## |
15 |
## Revision 1.16 2003/04/18 16:07:53 joko |
## Revision 1.16 2003/04/18 16:07:53 joko |
16 |
## just use logger if instantiation successed |
## just use logger if instantiation successed |
17 |
## |
## |
160 |
# handle meta data |
# handle meta data |
161 |
#my $metainfo = $self->getMetaInfo($class); |
#my $metainfo = $self->getMetaInfo($class); |
162 |
my $metainfo = $self->getMetaInfo(); |
my $metainfo = $self->getMetaInfo(); |
163 |
if (!$metainfo->{disconnectMethod}) { $metainfo->{disconnectMethod} = 'disconnect'; } |
#if (!$metainfo->{disconnectMethod}) { $metainfo->{disconnectMethod} = 'disconnect'; } |
164 |
# type? |
# type? |
165 |
$invocant =~ s/Data::Storage::Handler:://; |
$invocant =~ s/Data::Storage::Handler:://; |
166 |
$metainfo->{type} = $invocant; |
$metainfo->{type} = $invocant; |
250 |
} |
} |
251 |
#=cut |
#=cut |
252 |
|
|
253 |
|
=pod |
254 |
|
if (!$methodname) { |
255 |
|
die("Methodname is not defined!"); |
256 |
|
return; |
257 |
|
} |
258 |
|
=cut |
259 |
|
|
260 |
#print "$methodname - 3", "\n"; |
#print "$methodname - 3", "\n"; |
261 |
|
|
262 |
# try to dispatch method-call to Storage::Handler::* |
# try to dispatch method-call to Storage::Handler::* |
285 |
#$lock_AUTOLOAD = 1 if ($methodname eq 'insert'); |
#$lock_AUTOLOAD = 1 if ($methodname eq 'insert'); |
286 |
if (!$self->{lock_info}->{log_lock}) { |
if (!$self->{lock_info}->{log_lock}) { |
287 |
#print "method: $methodname", "\n"; |
#print "method: $methodname", "\n"; |
288 |
$logger->debug( __PACKAGE__ . "[$self->{metainfo}->{type}]" . "->" . $methodname . "(@_)" ); |
my $type = $self->{metainfo}->{type}; |
289 |
|
$type ||= ''; |
290 |
|
# FIXME! |
291 |
|
#$logger->debug( __PACKAGE__ . "[$type]" . "->" . $methodname . "(@_)" ); |
292 |
|
$logger->debug( __PACKAGE__ . "[$type]" . "->" . $methodname ); |
293 |
} else { |
} else { |
294 |
# AUTOLOAD - sub is locked to prevent deep recursions if (e.g.) db-inserts cause log-actions to same db itself |
# AUTOLOAD - sub is locked to prevent deep recursions if (e.g.) db-inserts cause log-actions to same db itself |
295 |
} |
} |