--- nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2003/02/20 20:20:26 1.28 +++ nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2003/02/21 01:47:18 1.29 @@ -1,8 +1,12 @@ ############################################ # -# $Id: Tangram.pm,v 1.28 2003/02/20 20:20:26 joko Exp $ +# $Id: Tangram.pm,v 1.29 2003/02/21 01:47:18 joko Exp $ # # $Log: Tangram.pm,v $ +# Revision 1.29 2003/02/21 01:47:18 joko +# purged old code +# minor cosmetics +# # Revision 1.28 2003/02/20 20:20:26 joko # tried to get auto-disconnect working again - failed with that # @@ -125,7 +129,6 @@ use Data::Storage::Result::Tangram; use Data::Compare::Struct qw( isEmpty ); use Data::Transform::Deep qw( expand ); -#use Data::Transform::Encode qw( var2utf8 ); # get logger instance my $logger = Log::Dispatch::Config->instance; @@ -641,27 +644,29 @@ # build options (a callback to unload autovivified objects) for 'expand' # TODO: use $logger to write to debug here! my $cb; # = sub {}; + + # deactivated way to get rid of used instances, if requested =pod - if ($options->{destroy}) { - $options->{cb}->{destroy} = sub { - print "================ DESTROY", "\n"; - my $object = shift; - #print Dumper($object); - $self->{_COREHANDLE}->unload($object); - #undef($object); - }; - } + if ($options->{destroy}) { + $options->{cb}->{destroy} = sub { + print "================ DESTROY", "\n"; + my $object = shift; + #print Dumper($object); + $self->{_COREHANDLE}->unload($object); + #undef($object); + }; + } =cut my $hash = expand($obj, $options); - #$options->{cb}->{destroy}->($obj); - #$self->{_COREHANDLE}->unload($obj); - - # convert values in hash to utf8 to be ready for (e.g.) encapsulation in XML - # now done in expand - #var2utf8($hash) if ($options->{utf8}); + + # old (unsuccessful) attempts to get rid of used instances, if requested + + # V1: + #$options->{cb}->{destroy}->($obj); + #$self->{_COREHANDLE}->unload($obj); - # old (wrong) attempts to get rid of used instances, if requested + # V2: #$obj->clear_refs; #$self->{COREHANDLE}->unload($obj) if($options->{destroy}); #$obj->DESTROY;