in reply to sortkeys for Data::Dump
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sortkeys for Data::Dump
by Anonymous Monk on Jul 22, 2013 at 00:27 UTC | |
by rjt (Curate) on Jul 22, 2013 at 02:30 UTC | |
by Anonymous Monk on Jul 22, 2013 at 03:17 UTC |