From 9e5de6ae775d6886b3c0b1f745e8a1416ac9b1cd Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Thu, 9 May 2013 20:19:33 -0300 Subject: [PATCH] gv_fetchpvn_flags: Simplify some warnings code This line originally checked isLEXWARN_on and had two different code paths depending on that -- one of which called ckWARN(), which already checks for isLEXWARN_off, so rather than doing duplicate work, we just call ckWARN(). --- gv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gv.c b/gv.c index b0bcd76..c84e569 100644 --- a/gv.c +++ b/gv.c @@ -2125,8 +2125,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, UTF8fARG(is_utf8, name_end-nambeg, nambeg)); gv_init_pvn(gv, stash, name, len, (add & GV_ADDMULTI)|is_utf8); - if ( isIDFIRST_lazy_if(name, is_utf8) - && ! (isLEXWARN_on ? ckWARN(WARN_ONCE) : (PL_dowarn & G_WARN_ON ) ) ) + if ( isIDFIRST_lazy_if(name, is_utf8) && !ckWARN(WARN_ONCE) ) GvMULTI_on(gv) ; /* set up magic where warranted */ -- 2.7.4