9 |
## ------------------------------------------------------------------------ |
## ------------------------------------------------------------------------ |
10 |
## |
## |
11 |
## $Log$ |
## $Log$ |
12 |
|
## Revision 1.17 2003/01/30 21:42:22 joko |
13 |
|
## + minor update: renamed method |
14 |
|
## |
15 |
## Revision 1.16 2003/01/20 16:52:13 joko |
## Revision 1.16 2003/01/20 16:52:13 joko |
16 |
## + now using 'DesignPattern::Object' to create a new 'Data::Storage::Handler::Xyz' on demand - before we did this in a hand-rolled fashion |
## + now using 'DesignPattern::Object' to create a new 'Data::Storage::Handler::Xyz' on demand - before we did this in a hand-rolled fashion |
17 |
## |
## |
157 |
|
|
158 |
# filtering AUTOLOAD calls and first-time-touch of the actual storage impl |
# filtering AUTOLOAD calls and first-time-touch of the actual storage impl |
159 |
if ($self->_filter_AUTOLOAD($method)) { |
if ($self->_filter_AUTOLOAD($method)) { |
160 |
$self->_accessStorage(); |
#print "=== FILTER!", "\n"; |
161 |
|
$self->_accessStorageHandle(); |
162 |
if ($self->{STORAGEHANDLE}) { |
if ($self->{STORAGEHANDLE}) { |
163 |
return $self->{STORAGEHANDLE}->$method(@_); |
return $self->{STORAGEHANDLE}->$method(@_); |
164 |
} else { |
} else { |
190 |
return @result; |
return @result; |
191 |
} |
} |
192 |
|
|
193 |
sub _accessStorage { |
sub _accessStorageHandle { |
194 |
my $self = shift; |
my $self = shift; |
195 |
# TODO: to some tracelevel! |
# TODO: to some tracelevel! |
196 |
|
#print "=========== _accessStorage", "\n"; |
197 |
if ($TRACELEVEL) { |
if ($TRACELEVEL) { |
198 |
$logger->debug( __PACKAGE__ . "[$self->{locator}->{type}]" . "->_accessStorage()" ); |
$logger->debug( __PACKAGE__ . "[$self->{locator}->{type}]" . "->_accessStorageHandle()" ); |
199 |
} |
} |
200 |
if (!$self->{STORAGEHANDLE}) { |
if (!$self->{STORAGEHANDLE}) { |
201 |
return $self->_createStorageHandle(); |
return $self->_createStorageHandle(); |