diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-21 16:49:09 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-21 16:49:09 +0000 |
commit | 5df59fb6a00631e53c12c105628822fb0f102119 (patch) | |
tree | 66a75223a453b033722a174ae826067df1b0dc06 /ext | |
parent | 69282e910994b718c7eedc8f550888058a4e93ff (diff) | |
download | perl-5df59fb6a00631e53c12c105628822fb0f102119.tar.gz |
fix bug in dumping self-referential scalars
p4raw-id: //depot/perl@4832
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Data/Dumper/Dumper.pm | 2 | ||||
-rw-r--r-- | ext/Data/Dumper/Dumper.xs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm index a4aa3288a6..e134a21279 100644 --- a/ext/Data/Dumper/Dumper.pm +++ b/ext/Data/Dumper/Dumper.pm @@ -230,7 +230,7 @@ sub _dump { if ($s->{purity} and $s->{level} > 0) { $out = ($realtype eq 'HASH') ? '{}' : ($realtype eq 'ARRAY') ? '[]' : - "''" ; + 'do{my $o}' ; push @post, $name . " = " . $s->{seen}{$id}[0]; } else { diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index 125375facc..6394a63b28 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -202,7 +202,7 @@ DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, else if (realtype == SVt_PVAV) sv_catpvn(retval, "[]", 2); else - sv_catpvn(retval, "''", 2); + sv_catpvn(retval, "do{my $o}", 9); postentry = newSVpvn(name, namelen); sv_catpvn(postentry, " = ", 3); sv_catsv(postentry, othername); |