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 {
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);
if (defined &Data::Dumper::Dumpxs) {
print "### XS extension loaded, will run XS tests\n";
- $TMAX = 174; $XS = 1;
+ $TMAX = 186; $XS = 1;
}
else {
print "### XS extensions not loaded, will NOT run XS tests\n";
- $TMAX = 87; $XS = 0;
+ $TMAX = 93; $XS = 0;
}
print "1..$TMAX\n";
# #0
# 10,
# #1
-# '',
+# do{my $o},
# #2
# {
# 'a' => 1,
-# 'b' => '',
+# 'b' => do{my $o},
# 'c' => [],
# 'd' => {}
# }
#*::foo = \5;
#*::foo = [
# 10,
-# '',
+# do{my $o},
# {
# 'a' => 1,
-# 'b' => '',
+# 'b' => do{my $o},
# 'c' => [],
# 'd' => {}
# }
#*::foo = \@bar;
#*::foo = {
# 'a' => 1,
-# 'b' => '',
+# 'b' => do{my $o},
# 'c' => [],
# 'd' => {}
#};
#*::foo = $bar;
#*::foo = {
# 'a' => 1,
-# 'b' => '',
+# 'b' => do{my $o},
# 'c' => [],
# 'd' => {}
#};
$WANT = <<'EOT';
#@a = (
# undef,
-# ''
+# do{my $o}
#);
#$a[1] = \$a[0];
EOT
# {
# a => \[
# {
-# c => ''
+# c => do{my $o}
# },
# {
# d => \[]
TEST q(Data::Dumper->new([$a,$b,$c],['a','b','c'])->Maxdepth(1)->Dumpxs;)
if $XS;
}
+
+{
+ $a = \$a;
+ $b = [$a];
+
+############# 175
+##
+ $WANT = <<'EOT';
+#$b = [
+# \$b->[0]
+#];
+EOT
+
+TEST q(Data::Dumper->new([$b],['b'])->Purity(0)->Dump;);
+TEST q(Data::Dumper->new([$b],['b'])->Purity(0)->Dumpxs;)
+ if $XS;
+
+############# 181
+##
+ $WANT = <<'EOT';
+#$b = [
+# \do{my $o}
+#];
+#${$b->[0]} = $b->[0];
+EOT
+
+
+TEST q(Data::Dumper->new([$b],['b'])->Purity(1)->Dump;);
+TEST q(Data::Dumper->new([$b],['b'])->Purity(1)->Dumpxs;)
+ if $XS;
+}