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