In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/d824713b62f02cde14f81842e437a248c159a6d1?hp=d47e1c27dd43d7b79216c58864a5e539f612e974>

- Log -----------------------------------------------------------------
commit d824713b62f02cde14f81842e437a248c159a6d1
Author: Nicholas Clark <[email protected]>
Date:   Sat Oct 24 12:57:18 2009 +0100

    In S_pending_ident(), only call gv_fetchpvn_flags() if the warning is 
enabled.
    
    ckWARN(WARN_AMBIGUOUS) is cheaper than Perl_gv_fetchpvn_flags().
-----------------------------------------------------------------------

Summary of changes:
 toke.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/toke.c b/toke.c
index e1f98dc..8c019c5 100644
--- a/toke.c
+++ b/toke.c
@@ -7129,7 +7129,8 @@ S_pending_ident(pTHX)
        and @foo isn't a variable we can find in the symbol
        table.
     */
-    if (pit == '@' && PL_lex_state != LEX_NORMAL && !PL_lex_brackets) {
+    if (ckWARN(WARN_AMBIGUOUS) &&
+       pit == '@' && PL_lex_state != LEX_NORMAL && !PL_lex_brackets) {
         GV *const gv = gv_fetchpvn_flags(PL_tokenbuf + 1, tokenbuf_len - 1, 0,
                                         SVt_PVAV);
         if ((!gv || ((PL_tokenbuf[0] == '@') ? !GvAV(gv) : !GvHV(gv)))
@@ -7139,9 +7140,9 @@ S_pending_ident(pTHX)
           )
         {
             /* Downgraded from fatal to warning 20000522 mjd */
-            Perl_ck_warner(aTHX_ packWARN(WARN_AMBIGUOUS),
-                          "Possible unintended interpolation of %s in string",
-                          PL_tokenbuf);
+            Perl_warner(aTHX_ packWARN(WARN_AMBIGUOUS),
+                       "Possible unintended interpolation of %s in string",
+                       PL_tokenbuf);
         }
     }
 

--
Perl5 Master Repository

Reply via email to