From 2fa12875d3471589c21f76569ef6feb48a2e82ec Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand" Date: Wed, 25 Nov 2009 13:15:30 +0100 Subject: [PATCH] use $Data::Dumper::Quotekeys = 0; instead of removing the quotes myself --- ChangeLog | 4 ++++ Peek.pm | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 352c4b7..12fbe88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-11-25 0.30 - H.Merijn Brand + + * Use $Data::Dumper::Quotekeys = 0; instead of removing the quotes myself + 2009-11-09 0.29 - H.Merijn Brand * Use skip instead of skip_all for builds that have no DPeek () diff --git a/Peek.pm b/Peek.pm index 326c681..6e42d82 100644 --- a/Peek.pm +++ b/Peek.pm @@ -6,7 +6,7 @@ use warnings; use DynaLoader (); use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK ); -$VERSION = "0.29"; +$VERSION = "0.30"; @ISA = qw( DynaLoader Exporter ); @EXPORT = qw( DDumper DDsort DPeek DDisplay DDump DDual DGrow ); @EXPORT_OK = qw( triplevar ); @@ -68,11 +68,12 @@ sub import sub DDumper { - local $Data::Dumper::Sortkeys = $_sortkeys; - local $Data::Dumper::Indent = 1; + local $Data::Dumper::Sortkeys = $_sortkeys; + local $Data::Dumper::Indent = 1; + local $Data::Dumper::Quotekeys = 0; my $s = Data::Dumper::Dumper @_; - $s =~ s!^(\s*)'([^']*)'\s*=>!sprintf "%s%-16s =>", $1, $2!gme; # Align => ' + $s =~ s!^(\s*)(.*?)\s*=>!sprintf "%s%-16s =>", $1, $2!gme; # Align => $s =~ s!\bbless\s*\(\s*!bless (!gm and $s =~ s!\s+\)([;,])$!)$1!gm; $s =~ s!^(?= *[]}](?:[;,]|$))! !gm; $s =~ s!^(\s+)!$1$1!gm; -- 2.11.4.GIT