summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2013-05-09 20:19:33 -0300
committerTony Cook <tony@develop-help.com>2013-09-11 10:28:29 +1000
commit9e5de6ae775d6886b3c0b1f745e8a1416ac9b1cd (patch)
tree7afc09ba367560dcaaa99afc9a8747121ef5f141 /gv.c
parent71c35c050edbde3b10f7b0ec3be6dc532979ff36 (diff)
downloadperl-9e5de6ae775d6886b3c0b1f745e8a1416ac9b1cd.tar.gz
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().
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gv.c b/gv.c
index b0bcd76d2c..c84e56980e 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 */