diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2005-07-13 00:21:13 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2005-07-13 00:21:13 +0000 |
commit | 041457d90dbb6fb79a72c7a8462f01423f2daa09 (patch) | |
tree | 5393e1e2a48eb57f050aa85b76a30b7f9f198257 /gv.c | |
parent | e352bcff231c07cf21f07ae801f374a3da3229ed (diff) | |
download | perl-041457d90dbb6fb79a72c7a8462f01423f2daa09.tar.gz |
make the expensive ckWARN() be called as late as possible
reorganise
if (ckWARN(FOO) && should_not_happen_condition)
to
if (should_not_happen_condition && ckWARN(FOO))
p4raw-id: //depot/perl@25129
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -547,8 +547,9 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method) /* * Inheriting AUTOLOAD for non-methods works ... for now. */ - if (ckWARN2(WARN_DEPRECATED, WARN_SYNTAX) && !method && - (GvCVGEN(gv) || GvSTASH(gv) != stash)) + if (!method && (GvCVGEN(gv) || GvSTASH(gv) != stash) + && ckWARN2(WARN_DEPRECATED, WARN_SYNTAX) + ) Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), "Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated", packname, (int)len, name); |