summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-26 10:24:40 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-26 10:24:40 +0000
commitc0a413d1892b414bcca7420c00e6725079449e3c (patch)
tree929c4815d50a49b4e28bc8851662b6e65650ee4d
parentd01136d6c9d281873ffd814253bf0fec93cf20f4 (diff)
downloadperl-c0a413d1892b414bcca7420c00e6725079449e3c.tar.gz
Change 33069 missed updating dump.c to dump PVIOs correctly.
p4raw-id: //depot/perl@33071
-rw-r--r--dump.c2
-rw-r--r--ext/Devel/Peek/t/Peek.t30
2 files changed, 30 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index 3e4db867ea..314728631f 100644
--- a/dump.c
+++ b/dump.c
@@ -1554,7 +1554,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
(UV) COP_SEQ_RANGE_HIGH(sv));
} else if ((type >= SVt_PVNV && type != SVt_PVAV && type != SVt_PVHV
&& type != SVt_PVCV && type != SVt_PVFM && type != SVt_REGEXP
- && !isGV_with_GP(sv) && !SvVALID(sv))
+ && type != SVt_PVIO && !isGV_with_GP(sv) && !SvVALID(sv))
|| type == SVt_NV) {
STORE_NUMERIC_LOCAL_SET_STANDARD();
/* %Vg doesn't work? --jhi */
diff --git a/ext/Devel/Peek/t/Peek.t b/ext/Devel/Peek/t/Peek.t
index 47f8ab23ae..e62ffdfba2 100644
--- a/ext/Devel/Peek/t/Peek.t
+++ b/ext/Devel/Peek/t/Peek.t
@@ -14,7 +14,7 @@ BEGIN { require "./test.pl"; }
use Devel::Peek;
-plan(48);
+plan(50);
our $DEBUG = 0;
open(SAVERR, ">&STDERR") or die "Can't dup STDERR: $!";
@@ -45,6 +45,9 @@ sub do_test {
($] < 5.009) ? " IV = 0\n NV = 0\n" : '';
/mge;
$pattern =~ s/\$RV/IV/g if $] >= 5.011;
+ $pattern =~ s/^ *\$NV *\n/
+ ($] < 5.011) ? " NV = 0\n" : '';
+ /mge;
print $pattern, "\n" if $DEBUG;
my ($dump, $dump2) = split m/\*\*\*\*\*\n/, scalar <IN>;
@@ -541,3 +544,28 @@ do_test(24,
UV = \d+
NV = 0
PV = 0');
+
+do_test(25,
+ *STDOUT{IO},
+'SV = $RV\\($ADDR\\) at $ADDR
+ REFCNT = 1
+ FLAGS = \\(ROK\\)
+ RV = $ADDR
+ SV = PVIO\\($ADDR\\) at $ADDR
+ REFCNT = 3
+ FLAGS = \\(OBJECT\\)
+ IV = 0
+ $NV
+ STASH = $ADDR\s+"IO::Handle"
+ IFP = $ADDR
+ OFP = $ADDR
+ DIRP = 0x0
+ LINES = 0
+ PAGE = 0
+ PAGE_LEN = 60
+ LINES_LEFT = 0
+ TOP_GV = 0x0
+ FMT_GV = 0x0
+ BOTTOM_GV = 0x0
+ TYPE = \'>\'
+ FLAGS = 0x0');