Permalink
Browse files

Merge branch 'error_niceness' into devel

  • Loading branch information...
2 parents 4b69024 + dff7227 commit bebfbf127c2d9f2e308f3a9433c0d11bf5dd6d77 @xsawyerx xsawyerx committed Mar 26, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Dancer/Error.pm
View
@@ -124,12 +124,14 @@ sub dumper {
#use Data::Dumper;
my $dd = Data::Dumper->new([\%data]);
- $dd->Terse(1)->Quotekeys(0)->Indent(1);
+ $dd->Terse(1)->Quotekeys(0)->Indent(1)->Sortkeys(1);
my $content = $dd->Dump();
$content =~ s{(\s*)(\S+)(\s*)=>}{$1<span class="key">$2</span>$3 =&gt;}g;
if ($censored) {
$content
- .= "\n\nNote: Values of $censored sensitive-looking keys hidden\n";
+ .= "\n\nNote: Values of $censored sensitive-looking key"
+ . ($censored == 1 ? '' : 's')
+ . " hidden\n";
}
return $content;
}

0 comments on commit bebfbf1

Please sign in to comment.