On May 14, 2004, at 10:26 AM, Ted Zlatanov wrote:
On Thu, 13 May 2004, aakhter@cisco.com 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;
;-) The above is possible, but why post-process the created struct when
you don't need to put in __VALUE__ at all? I understand the need for it
for some applications. But other ones (eg when converting the returned
hash to xml via xml::simple) only add a level of unneeded indirection.
But perhaps my problem is not really that common...

<name>DHCPD Database</name>

To get around this I have to do this:
$return = {

btw the value of interest is actually inside __VALUE__ so you'd have to
return the value of __VALUE__ and set it to the parent.
Aamer Akhter / aa@cisco.com
NSITE cisco Systems

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 6 | next ›
Discussion Overview
grouprecdescent @
postedMay 14, '04 at 3:37a
activeMay 15, '04 at 1:39p

2 users in discussion

Aamer Akhter: 4 posts Ted Zlatanov: 2 posts



site design / logo © 2019 Grokbase