diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-28 08:03:14 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-28 08:03:14 +0000 |
commit | 114bafba71b4fe6a08258e1f6dfc504b5d9fd70c (patch) | |
tree | c6702b30fa74558814c7042a0e25c4b0e587d684 /pp_ctl.c | |
parent | 29778b0a112f48db42e9a1afb6e937e0ce9be444 (diff) | |
download | perl-114bafba71b4fe6a08258e1f6dfc504b5d9fd70c.tar.gz |
warnings::enabled() doesn't fall back to looking at $^W if
caller isn't using lexical warnings (from Paul Marquess)
p4raw-id: //depot/perl@6132
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1571,9 +1571,12 @@ PP(pp_caller) { SV * mask ; SV * old_warnings = cx->blk_oldcop->cop_warnings ; - if (old_warnings == pWARN_NONE || old_warnings == pWARN_STD) + + if (old_warnings == pWARN_NONE || + (old_warnings == pWARN_STD && (PL_dowarn & G_WARN_ON) == 0)) mask = newSVpvn(WARN_NONEstring, WARNsize) ; - else if (old_warnings == pWARN_ALL) + else if (old_warnings == pWARN_ALL || + (old_warnings == pWARN_STD && PL_dowarn & G_WARN_ON)) mask = newSVpvn(WARN_ALLstring, WARNsize) ; else mask = newSVsv(old_warnings); |