Unless the peephole optimiser already knows that we're in void context,
Nicholas Clark [Sat, 24 Dec 2005 14:48:42 +0000 (14:48 +0000)]
avoid even attempting the whole proxy constant sub copying
optimisation.

p4raw-id: //depot/perl@26482

op.c

diff --git a/op.c b/op.c
index eebaf67..cb9b0e6 100644 (file)
--- a/op.c
+++ b/op.c
@@ -7319,6 +7319,10 @@ Perl_peep(pTHX_ register OP *o)
 
            o->op_opt = 1;
 
+
+           if ((o->op_flags && OPf_WANT) != OPf_WANT_VOID)
+               break;
+
            if ((o->op_private & ~OPpASSIGN_BACKWARDS) != 2)
                break;