summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c1
-rw-r--r--op.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/op.c b/op.c
index 5cb6392c13..ccd2fadb21 100644
--- a/op.c
+++ b/op.c
@@ -1567,6 +1567,7 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
/* FALL THROUGH */
default:
nomod:
+ if (flags & OP_LVALUE_NO_CROAK) return NULL;
/* grep, foreach, subcalls, refgen */
if (type == OP_GREPSTART || type == OP_ENTERSUB
|| type == OP_REFGEN || type == OP_LEAVESUBLV)
diff --git a/op.h b/op.h
index 24463a8fd4..ce17bd53f2 100644
--- a/op.h
+++ b/op.h
@@ -765,6 +765,10 @@ preprocessing token; the type of I<arg> depends on I<which>.
#define op_lvalue(op,t) Perl_op_lvalue_flags(aTHX_ op,t,0)
+/* flags for op_lvalue_flags */
+
+#define OP_LVALUE_NO_CROAK 1
+
/*
=head1 Custom Operators