There is no analogous method, because Data::Dump sorts the keys by default. (Confirmed by inspection of Data/Dump.pm.)
#!/usr/bin/env perl
use 5.012;
use warnings;
use Data::Dump qw/dump/;
my $data = {
key1 => 'foo',
key2 => 3,
key0 => 'bar',
};
dump $data;
Output:
{ key0 => "bar", key1 => "foo", key2 => 3 }
If you need to customize the sort subroutine, however, you will need to hook into Data::Dump::Filtered. You did not specify which usage you need, but you supplied empty arguments to Sortkeys() in your OP, so I'll assume the former for now. | [reply] [d/l] [select] |
| [reply] [d/l] |
{
unknown => "unknown key",
one => "first",
two => {
one => "the",
six => "inner",
seven => "hash",
eight => "works",
nine => "too",
},
three => "third",
}
I think a patch is in order,
Not a bad idea, either. | [reply] [d/l] [select] |