Subject: | [PATCH] 5.11 breaks sanity check |
Bleadperl@33018 introduces CXp_HASARGS and so the sanity check in
_context_cv breaks. I patched it as below and the tests pass again but I
don't know if it is a good fix. Let me know if and how it can be done
better. Thanks.
Patch (without tweaked whitespace) also available from CPAN as
ANDK/patches/Devel-Caller-2.03-ANDK-01.patch.gz.
--- Devel-Caller-2.03-KD9mnt.orig/Caller.xs 2008-01-08
15:39:43.000000000 +0100
+++ Devel-Caller-2.03-KD9mnt/Caller.xs 2008-02-08 05:04:18.000000000 +0100
@@ -12,8 +12,13 @@ SV* context;
PERL_CONTEXT *cx = INT2PTR(PERL_CONTEXT *, SvIV(context));
CV *cur_cv;
- if (cx->cx_type != CXt_SUB)
- croak("cx_type is %d not CXt_SUB\n", cx->cx_type);
+ if (cx->cx_type != CXt_SUB
+#ifdef CXp_HASARGS
+ /* perforce #33018 */
+ && cx->cx_type != (CXt_SUB|CXp_HASARGS)
+#endif
+ )
+ croak("cx_type is %d not %d\n", cx->cx_type, CXt_SUB);
cur_cv = cx->blk_sub.cv;
if (!cur_cv)