A bozo's blog
$Data::Dumper::Sortkeys = 1;
$Data::Dumper::Sortkeys = sub { [sort {$a cmp $b} keys %{$_[0]}] };
$Data::Dumper::Sortkeys = sub { [ sort { $_[0]->{$a} <=> $_[0]->{$b} } keys %{$_[0]} ] };