Help for this page
my %created = ( AUTHOR => $author, TYPE => $node_type, ... PARENT => $parent_id || '', KIDS => [], );
for my $root ( sort { $a <=> $b } keys %created ) { my $parent = $created{$root}{PARENT}; push @{$created{$parent}{KIDS}}, $root; }
sub print_nodes { my @kids = @_; ... } print_nodes( @topnodes );