subclassable %Live_Objects key
[prev]
[thread]
[next]
[Date index for 2004/06/29]
dear perrin, list,
Could I suggest that in the next version of Class::DBI the key used to
store an object in the %Live_Objects hash is returned by a separate
live_objects_key() method, so that we can subclass it?
I often have several instances of an application running side by side,
using Class::DBI::Factory to let each one access a separate database
and set of templates, configuration files, etc, but use the same perl.
The object stash currently defeats this separation, returning objects
with the right id, but from whichever database was accessed first. All
I have to do is prepend an identifier, but at the moment you do this:
my $obj_key = join "|", ref $self, map $_ . '=' . $data{$_},
sort @primary_columns;
in two places and I have to override them both, which seems nasty, and
I really hate subclassing _init :)
thanks
will
|
subclassable %Live_Objects key
william ross 09:34 on 29 Jun 2004
|