summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-09-13 23:33:03 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-14 22:29:44 -0700
commitf07626add3eda6dfda7c5f6fe05cbe1c9293ccd2 (patch)
treea1762b06a4a7cc29cc6504beead035305a109e80 /pp_ctl.c
parent38248b9d23f2dd91529d8b3c32ad8f5f3ec93950 (diff)
downloadperl-f07626add3eda6dfda7c5f6fe05cbe1c9293ccd2.tar.gz
Make (caller $n)[9] respect std warnings
In commit 7e4f04509c6 I forgot about caller. This commit makes the value returned by (caller $n)[9] assignable to ${^WARNING_BITS} to produce exactly the same warnings settings, including warnings con- trolled by $^W.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index ec03976882..b8c0842dc2 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1904,9 +1904,10 @@ PP(pp_caller)
SV * mask ;
STRLEN * const old_warnings = cx->blk_oldcop->cop_warnings ;
- if (old_warnings == pWARN_NONE ||
- (old_warnings == pWARN_STD && (PL_dowarn & G_WARN_ON) == 0))
+ if (old_warnings == pWARN_NONE)
mask = newSVpvn(WARN_NONEstring, WARNsize) ;
+ else if (old_warnings == pWARN_STD && (PL_dowarn & G_WARN_ON) == 0)
+ mask = &PL_sv_undef ;
else if (old_warnings == pWARN_ALL ||
(old_warnings == pWARN_STD && PL_dowarn & G_WARN_ON)) {
/* Get the bit mask for $warnings::Bits{all}, because