diff options
author | Mathieu Arnold <m@absolight.fr> | 2004-06-10 18:43:58 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-06-10 19:03:51 +0000 |
commit | 41a63c2f0a70d77b39bfc2320f65e2edb58c6519 (patch) | |
tree | 6edaadc8ca15c6ba76ffc50c957b15283a7ea61c /ext | |
parent | 09f4278941fe925f20d703828b105fac98aebb69 (diff) | |
download | perl-41a63c2f0a70d77b39bfc2320f65e2edb58c6519.tar.gz |
Re: [perl #30197] perlbug AutoReply: Data::Dumper does not indent the deparsed code properly
Message-ID: <34D483170C7F84E0DFBE442B@andromede.in.reaumur.net>
(with a test adjustment)
p4raw-id: //depot/perl@22926
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Data/Dumper/Dumper.pm | 4 | ||||
-rwxr-xr-x | ext/Data/Dumper/t/dumper.t | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm index 176038174f..763a41f1cd 100644 --- a/ext/Data/Dumper/Dumper.pm +++ b/ext/Data/Dumper/Dumper.pm @@ -9,7 +9,7 @@ package Data::Dumper; -$VERSION = '2.121'; +$VERSION = '2.121_01'; #$| = 1; @@ -381,7 +381,7 @@ sub _dump { if ($s->{deparse}) { require B::Deparse; my $sub = 'sub ' . (B::Deparse->new)->coderef2text($val); - $pad = $s->{sep} . $s->{pad} . $s->{xpad} . $s->{apad} . ' '; + $pad = $s->{sep} . $s->{pad} . $s->{apad} . $s->{xpad} x ($s->{level} - 1); $sub =~ s/\n/$pad/gse; $out .= $sub; } else { diff --git a/ext/Data/Dumper/t/dumper.t b/ext/Data/Dumper/t/dumper.t index 92cd3ef360..340a539e8b 100755 --- a/ext/Data/Dumper/t/dumper.t +++ b/ext/Data/Dumper/t/dumper.t @@ -960,8 +960,8 @@ TEST q(Data::Dumper->new([[$c, $d]])->Dumpxs;) $WANT = <<'EOT'; #$VAR1 = { # foo => sub { -# print 'foo'; -# } +# print 'foo'; +# } # }; EOT |