This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
dump.c: Dump pmop patterns without trailing )
authorFather Chrysostomos <sprout@cpan.org>
Sun, 12 Oct 2014 13:48:08 +0000 (06:48 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 12 Oct 2014 13:48:42 +0000 (06:48 -0700)
dump.c

diff --git a/dump.c b/dump.c
index addc38d..fe1c01b 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -642,8 +642,8 @@ Perl_do_pmop_dump(pTHX_ I32 level, PerlIO *file, const PMOP *pm)
     else
        ch = '/';
     if (PM_GETRE(pm))
-       Perl_dump_indent(aTHX_ level, file, "PMf_PRE %c%s%c%s\n",
-            ch, RX_PRECOMP(PM_GETRE(pm)), ch,
+       Perl_dump_indent(aTHX_ level, file, "PMf_PRE %c%.*s%c%s\n",
+            ch,(int)RX_PRELEN(PM_GETRE(pm)), RX_PRECOMP(PM_GETRE(pm)), ch,
             (pm->op_private & OPpRUNTIME) ? " (RUNTIME)" : "");
     else
        Perl_dump_indent(aTHX_ level, file, "PMf_PRE (RUNTIME)\n");