Re: suppressing __VALUE__ in <autotree>

[email protected] ("Ted Zlatanov") 14 May 2004 10:26:40 -0400
Newsgroups perl.recdescent
Organization Теодор Златанов @ Cienfuegos
Message-ID <[email protected]>
On Thu, 13 May 2004, [email protected] wrote:

> Is there a way of supressing the __VALUE__ hash that is added via a
> single terminal return in <autotree>? Right now I have to play silly
> little games on the return values. I realize that I could add my own
> return handler but <autotree> is _so_ nice otherwise.

Why not just remove it?  Untested code follows...

sub remove_VALUE
{
 my $hashref = shift @_;
 
 delete $hashref->{__VALUE__};
 remove_VALUE($hashref->{$_}) foreach keys %$hashref;
}

Ted