minor logic tweak for reserved word warning
authorGurusamy Sarathy <gsar@cpan.org>
Mon, 24 May 1999 03:03:05 +0000 (03:03 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Mon, 24 May 1999 03:03:05 +0000 (03:03 +0000)
p4raw-id: //depot/perl@3451

lib/Test/Harness.pm
toke.c

index 662ec7f..3cc3749 100644 (file)
@@ -300,7 +300,7 @@ sub runtests {
            die "Failed $bad/$total test scripts, $pct% okay.$subpct\n";
        }
     }
-    printf("Files=%d,  Tests=%d, %s\n", $files, $totmax, timestr($t_total, 'nop'));
+    printf("Files=%d, Tests=%d, %s\n", $files, $totmax, timestr($t_total, 'nop'));
 
     return ($bad == 0 && $totmax) ;
 }
diff --git a/toke.c b/toke.c
index 441839b..0105fe1 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3255,17 +3255,19 @@ int yylex(PERL_YYLEX_PARAM_DECL)
                    TOKEN(NOAMP);
                }
 
-               if (PL_hints & HINT_STRICT_SUBS)
-                   yylval.opval->op_private |= OPpCONST_STRICT;
-
                /* Call it a bare word */
 
-           bareword:
-               if (ckWARN(WARN_RESERVED)) {
-                   if (lastchar != '-') {
-                       for (d = PL_tokenbuf; *d && isLOWER(*d); d++) ;
-                       if (!*d)
-                           warner(WARN_RESERVED, PL_warn_reserved, PL_tokenbuf);
+               if (PL_hints & HINT_STRICT_SUBS)
+                   yylval.opval->op_private |= OPpCONST_STRICT;
+               else {
+               bareword:
+                   if (ckWARN(WARN_RESERVED)) {
+                       if (lastchar != '-') {
+                           for (d = PL_tokenbuf; *d && isLOWER(*d); d++) ;
+                           if (!*d)
+                               warner(WARN_RESERVED, PL_warn_reserved,
+                                      PL_tokenbuf);
+                       }
                    }
                }