Fix open POD section leak across different files in perl.req.
authorVille Skyttä <ville.skytta@iki.fi>
Thu, 25 Feb 2010 17:45:10 +0000 (19:45 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 1 Mar 2010 09:51:41 +0000 (11:51 +0200)
scripts/perl.req

index a52596b..0d543b7 100755 (executable)
@@ -115,12 +115,12 @@ sub process_file {
     # properly belongs in the over/back section) but people do not
     # read the perldoc.
 
-    if ( (m/^=(head[1-4]|pod|for|item)/) .. (m/^=(cut)/) ) {
-      next;
+    if (/^=(head[1-4]|pod|for|item)/) {
+      /^=cut/ && next while <FILE>;
     }
 
-    if ( (m/^=(over)/) .. (m/^=(back)/) ) {
-      next;
+    if (/^=over/) {
+      /^=back/ && next while <FILE>;
     }
 
     # skip the data section