Remove the venerable fatal error "Runaway format"
authorRafael Garcia-Suarez <rgs@consttype.org>
Thu, 22 Oct 2009 21:04:14 +0000 (23:04 +0200)
committerRafael Garcia-Suarez <rgs@consttype.org>
Thu, 22 Oct 2009 21:04:29 +0000 (23:04 +0200)
This solves bug "[perl #69927] wrong runaway error for write",
which is a link to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=77707

pod/perldiag.pod
pp_ctl.c

index f1f081d..2bad617 100644 (file)
@@ -3667,14 +3667,6 @@ always comes last, to avoid ambiguity with subsequent unary operators.
 (W io) The dirhandle you tried to do a rewinddir() on is either closed or not
 really a dirhandle.  Check your control flow.
 
-=item Runaway format
-
-(F) Your format contained the ~~ repeat-until-blank sequence, but it
-produced 200 lines at once, and the 200th line looked exactly like the
-199th line.  Apparently you didn't arrange for the arguments to exhaust
-themselves, either by using ^ instead of @ (for scalar variables), or by
-shifting or popping (for array variables).  See L<perlform>.
-
 =item Scalars leaked: %d
 
 (P) Something went wrong in Perl's internal bookkeeping of scalars:
index bbac702..c62ce26 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -903,11 +903,6 @@ PP(pp_formline)
                    *t = '\0';
                    SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
                    lines += FmLINES(PL_formtarget);
-                   if (lines == 200) {
-                       arg = t - linemark;
-                       if (strnEQ(linemark, linemark - arg, arg))
-                           DIE(aTHX_ "Runaway format");
-                   }
                    if (targ_is_utf8)
                        SvUTF8_on(PL_formtarget);
                    FmLINES(PL_formtarget) = lines;