Die if a sub with a sig would use an inherited @_
authorPeter Martini <PeterCMartini@GMail.com>
Tue, 16 Oct 2012 17:04:52 +0000 (13:04 -0400)
committerPeter Martini <PeterCMartini@GMail.com>
Wed, 17 Oct 2012 20:36:16 +0000 (16:36 -0400)
(Not sure if this is overkill)

pp_hot.c

index f358f01..67f442c 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2787,6 +2787,8 @@ try_autoload:
                MARK++;
            }
        }
+       else if (namecnt)
+           DIE(aTHX_ "Can't call a sub with signatures using an inherited @_");
        if ((cx->blk_u16 & OPpENTERSUB_LVAL_MASK) == OPpLVAL_INTRO &&
            !CvLVALUE(cv))
            DIE(aTHX_ "Can't modify non-lvalue subroutine call");