From b6c835310a005ce2e1187890772df402e7333876 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 22 Sep 2003 18:16:40 +0000 Subject: [PATCH] An error message need not be a novel. p4raw-id: //depot/perl@21319 --- pod/perldiag.pod | 5 +++-- pp_hot.c | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 37878ff..e445d08 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -4191,9 +4191,10 @@ modifier is not presently meaningful in substitutions. use the /g modifier. Currently, /c is meaningful only when /g is used. (This may change in the future.) -=item Use of freed value in iteration (perhaps you modified the iterated array within the loop?) +=item Use of freed value in iteration -(F) This is typically caused by code like the following: +(F) Perhaps you modified the iterated array within the loop? +This error is typically caused by code like the following: @a = (3,4); @a = () for (1,2,@a); diff --git a/pp_hot.c b/pp_hot.c index 70d4e6d..7cbc00b 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1872,8 +1872,7 @@ PP(pp_iter) } if (sv && SvREFCNT(sv) == 0) { *itersvp = Nullsv; - Perl_croak(aTHX_ - "Use of freed value in iteration (perhaps you modified the iterated array within the loop?)"); + Perl_croak(aTHX_ "Use of freed value in iteration"); } if (sv) -- 2.7.4