dump.c: Dump PV fields of SVt_PVIOs
authorFather Chrysostomos <sprout@cpan.org>
Sat, 22 Jun 2013 01:18:33 +0000 (18:18 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 23 Jun 2013 06:16:40 +0000 (23:16 -0700)
Yes, these can hold PVs when source filters are involved.

dump.c

diff --git a/dump.c b/dump.c
index caa27c1..e7900c3 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1660,7 +1660,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        return;
     }
 
-    if (type <= SVt_PVLV && !isGV_with_GP(sv)) {
+    if ((type <= SVt_PVLV && !isGV_with_GP(sv))
+     || (type == SVt_PVIO && IoFLAGS(sv) & IOf_FAKE_DIRP)) {
        const bool re = isREGEXP(sv);
        const char * const ptr =
            re ? RX_WRAPPED((REGEXP*)sv) : SvPVX_const(sv);