...

Thanks, I know :)

... hook ...

I don't think so, I think a patch is in order, but I give up

diff -ruN Data-Dump-1.22/lib/Data/Dump.pm Data-Dump-1.22-new/lib/Data/ +Dump.pm --- Data-Dump-1.22/lib/Data/Dump.pm 2013-05-10 03:32:23.000000000 - +0700 +++ Data-Dump-1.22-new/lib/Data/Dump.pm 2013-07-21 17:25:59.5625000 +00 -0700 @@ -124,6 +124,7 @@ my $out; my $comment; my $hide_keys; + my $da_keys; if (@FILTERS) { my $pself = ""; $pself = fullname("self", [@$idx[$pidx..(@$idx - 1)]]) if $pclass +; @@ -131,6 +132,9 @@ my @bless; for my $filter (@FILTERS) { if (my $f = $filter->($ctx, $rval)) { + if (my $v = $f->{da_keys}) { + warn "\ngrrrrrrr da_keys $v\n\n "; $da_keys = $v; + } if (my $v = $f->{object}) { local @FILTERS; $out = _dump($v, $name, $idx, 1); @@ -298,6 +302,23 @@ $text_keys++, last unless /^[-+]?(?:0|[1-9]\d*)(?:\.\d+)?\z/; } + if ( $da_keys ) { + warn "\ngrrrrrrrrr orig_keys @orig_keys\n\n "; + if( 'CODE' eq ref $da_keys){ + @orig_keys = $da_keys->( $text_keys, \@orig_keys ); + warn "\ngrrrrrrrrr orig_keys @orig_keys\n\n "; + } else { + #$da_keys->( $text_keys, \@orig_keys ); + } + } else { + if ($text_keys) { + @orig_keys = sort { lc($a) cmp lc($b) } @orig_keys; + } + else { + @orig_keys = sort { $a <=> $b } @orig_keys; + } + } + if ($text_keys) { @orig_keys = sort { lc($a) cmp lc($b) } @orig_keys; }

In reply to Re^2: sortkeys for Data::Dump by Anonymous Monk
in thread sortkeys for Data::Dump by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.