if (CvROOT(sv) && dumpops)
do_op_dump(level+1, file, CvROOT(sv));
Perl_dump_indent(aTHX_ level, file, " XSUB = 0x%"UVxf"\n", PTR2UV(CvXSUB(sv)));
- Perl_dump_indent(aTHX_ level, file, " XSUBANY = %"IVdf"\n", (IV)CvXSUBANY(sv).any_i32);
+ {
+ SV *constant = cv_const_sv((CV *)sv);
+
+
+ if (constant) {
+ Perl_dump_indent(aTHX_ level, file, " XSUBANY = 0x%"UVxf
+ " (CONST SV)\n",
+ PTR2UV(CvXSUBANY(sv).any_ptr));
+ do_sv_dump(level+1, file, constant, nest+1, maxnest, dumpops,
+ pvlim);
+ } else {
+ Perl_dump_indent(aTHX_ level, file, " XSUBANY = %"IVdf"\n",
+ (IV)CvXSUBANY(sv).any_i32);
+ }
+ }
do_gvgv_dump(level, file, " GVGV::GV", CvGV(sv));
Perl_dump_indent(aTHX_ level, file, " FILE = \"%s\"\n", CvFILE(sv));
Perl_dump_indent(aTHX_ level, file, " DEPTH = %"IVdf"\n", (IV)CvDEPTH(sv));
use Devel::Peek;
-print "1..22\n";
+print "1..23\n";
our $DEBUG = 0;
open(SAVERR, ">&STDERR") or die "Can't dup STDERR: $!";
CUR = 0
LEN = 0
STASH = $ADDR\s+"Foobar"');
+
+# Constant subroutines
+
+sub const () {
+ "Perl rules";
+}
+
+do_test(23,
+ \&const,
+'SV = RV\\($ADDR\\) at $ADDR
+ REFCNT = 1
+ FLAGS = \\(ROK\\)
+ RV = $ADDR
+ SV = PVCV\\($ADDR\\) at $ADDR
+ REFCNT = (2)
+ FLAGS = \\(POK,pPOK,CONST\\)
+ IV = 0
+ NV = 0
+ PROTOTYPE = ""
+ COMP_STASH = 0x0
+ ROOT = 0x0
+ XSUB = $ADDR
+ XSUBANY = $ADDR \\(CONST SV\\)
+ SV = PV\\($ADDR\\) at $ADDR
+ REFCNT = 1
+ FLAGS = \\(.*POK,READONLY,pPOK\\)
+ PV = $ADDR "Perl rules"\\\0
+ CUR = 10
+ LEN = \\d+
+ GVGV::GV = $ADDR\\t"main" :: "const"
+ FILE = ".*\\b(?i:peek\\.t)"
+ DEPTH = 0
+(?: MUTEXP = $ADDR
+ OWNER = $ADDR
+)? FLAGS = 0x200
+ OUTSIDE_SEQ = 0
+ PADLIST = 0x0
+ OUTSIDE = 0x0 \\(null\\)');