summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-05-28 08:03:14 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-05-28 08:03:14 +0000
commit114bafba71b4fe6a08258e1f6dfc504b5d9fd70c (patch)
treec6702b30fa74558814c7042a0e25c4b0e587d684 /pp_ctl.c
parent29778b0a112f48db42e9a1afb6e937e0ce9be444 (diff)
downloadperl-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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 2308d35814..cad91bd5c6 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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);