diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-05-09 20:19:33 -0300 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2013-09-11 10:28:29 +1000 |
commit | 9e5de6ae775d6886b3c0b1f745e8a1416ac9b1cd (patch) | |
tree | 7afc09ba367560dcaaa99afc9a8747121ef5f141 /gv.c | |
parent | 71c35c050edbde3b10f7b0ec3be6dc532979ff36 (diff) | |
download | perl-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.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 */ |