From: Slaven Rezic Date: Mon, 18 Nov 2002 11:09:51 +0000 (+0100) Subject: add support for STASH and MAGIC information for REFs to sv_dump(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6bf47b083ef4085da3ab3288ed9331208cbe862c;p=p5sagit%2Fp5-mst-13.2.git add support for STASH and MAGIC information for REFs to sv_dump(). Subject: [PATCH] Message-Id: <200211181009.gAIA9pFG034877@vran.herceg.de> p4raw-id: //depot/perl@18177 --- diff --git a/dump.c b/dump.c index 5dc1e5c..45d7494 100644 --- a/dump.c +++ b/dump.c @@ -1118,8 +1118,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_dump_indent(aTHX_ level, file, " RV = 0x%"UVxf"\n", PTR2UV(SvRV(sv))); if (nest < maxnest) do_sv_dump(level+1, file, SvRV(sv), nest+1, maxnest, dumpops, pvlim); - SvREFCNT_dec(d); - return; } if (type < SVt_PV) { SvREFCNT_dec(d); diff --git a/ext/Devel/Peek/Peek.t b/ext/Devel/Peek/Peek.t index ad34935..6bbdfde 100644 --- a/ext/Devel/Peek/Peek.t +++ b/ext/Devel/Peek/Peek.t @@ -12,7 +12,7 @@ BEGIN { use Devel::Peek; -print "1..21\n"; +print "1..22\n"; our $DEBUG = 0; open(SAVERR, ">&STDERR") or die "Can't dup STDERR: $!"; @@ -440,3 +440,24 @@ do_test(21, END { 1 while unlink("peek$$"); } + +# blessed refs +do_test(22, + bless(\\undef, 'Foobar'), +'SV = RV\\($ADDR\\) at $ADDR + REFCNT = 1 + FLAGS = \\(ROK\\) + RV = $ADDR + SV = PVMG\\($ADDR\\) at $ADDR + REFCNT = 2 + FLAGS = \\(OBJECT,ROK\\) + IV = \d+ + NV = \d+ + RV = $ADDR + SV = NULL\\(0x0\\) at $ADDR + REFCNT = \d+ + FLAGS = \\(READONLY\\) + PV = $ADDR "" + CUR = 0 + LEN = 0 + STASH = $ADDR\s+"Foobar"');