--- /usr/share/perl5/Tree/DAG_Node.pm 2018-02-13 23:16:43.000000000 +0100 +++ /home/shmem/perl/lib/Tree/DAG_Node.pm 2018-04-23 03:46:29.607515296 +0200 @@ -1661,7 +1661,7 @@ if(@daughters) { $o->{'_depth'} += 1; #print "Depth " , $o->{'_depth'}, "\n"; - foreach my $one (@daughters) { + foreach my $one (sort {$a->name cmp $b->name} @daughters) { $one->walk_down($o) if UNIVERSAL::can($one, 'is_node'); # and if it can do "is_node", it should provide a walk_down! }