Die Ausgabe von Data::Dumper sortieren lassen, damit sie besser durchsuchbar ist.
authorMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 1 Jun 2007 07:45:33 +0000 (07:45 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 1 Jun 2007 07:45:33 +0000 (07:45 +0000)
SL/LXDebug.pm

index cbb32f9..16ecf9a 100644 (file)
@@ -127,7 +127,9 @@ sub dump {
   my ($self, $level, $name, $variable) = @_;
 
   if ($data_dumper_available) {
-    $self->message($level, "dumping ${name}:\n" . Dumper($variable));
+    my $dumper = Data::Dumper->new([$variable]);
+    $dumper->Sortkeys(1);
+    $self->message($level, "dumping ${name}:\n" . $dumper->Dump());
   } else {
     $self->message($level,
                    "dumping ${name}: Data::Dumper not available; "