summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
Diffstat (limited to 'op.c')
-rw-r--r--op.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/op.c b/op.c
index af7ec8bec2..75d7583b18 100644
--- a/op.c
+++ b/op.c
@@ -3232,6 +3232,9 @@ OP *block;
SAVEFREESV(compcv);
goto done;
}
+ /* ahem, death to those who redefine active sort subs */
+ if (curstack == sortstack && sortcop == CvSTART(cv))
+ croak("Can't redefine active sort subroutine %s", name);
const_sv = cv_const_sv(cv);
if (const_sv || dowarn) {
line_t oldline = curcop->cop_line;