3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.16 2002/12/11 06:54:10 joko |
7 |
|
# + fix: encapsulated object-loading inside an 'eval' |
8 |
|
# |
9 |
# Revision 1.15 2002/12/05 13:55:21 joko |
# Revision 1.15 2002/12/05 13:55:21 joko |
10 |
# + now utilizing 'object2hash' instead of 'var_deref' |
# + now utilizing 'object2hash' instead of 'var_deref' |
11 |
# + played around with having fresh-objects - no progress.... |
# + played around with having fresh-objects - no progress.... |
500 |
my $self = shift; |
my $self = shift; |
501 |
my $oid = shift; |
my $oid = shift; |
502 |
my $options = shift; |
my $options = shift; |
503 |
# TODO: create a deep_unload method |
|
504 |
|
# TODO: create a deep_unload method (currently _all_ objects are unloaded) |
505 |
# unload($oid) will only unload object, not deep object hashes |
# unload($oid) will only unload object, not deep object hashes |
506 |
$self->{_COREHANDLE}->unload() if($options->{destroy}); |
$self->{_COREHANDLE}->unload() if($options->{destroy}); |
507 |
|
|
508 |
# TODO: review this |
# TODO: review this |
509 |
#if (!$self->{COREHANDLE}) { return; } |
#if (!$self->{COREHANDLE}) { return; } |
510 |
return $self->{_COREHANDLE}->load($oid); |
|
511 |
|
# TODO: review this |
512 |
|
my $object = eval('$self->{_COREHANDLE}->load($oid);'); |
513 |
|
print $@, "\n" if $@; |
514 |
|
|
515 |
|
return $object if $object; |
516 |
} |
} |
517 |
|
|
518 |
sub getObjectAsHash { |
sub getObjectAsHash { |