From: Jarkko Hietaniemi Date: Mon, 22 Sep 2003 18:16:40 +0000 (+0000) Subject: An error message need not be a novel. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6c835310a005ce2e1187890772df402e7333876;p=p5sagit%2Fp5-mst-13.2.git An error message need not be a novel. p4raw-id: //depot/perl@21319 --- 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)