diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-09-13 23:33:03 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-14 22:29:44 -0700 |
commit | f07626add3eda6dfda7c5f6fe05cbe1c9293ccd2 (patch) | |
tree | a1762b06a4a7cc29cc6504beead035305a109e80 /pp_ctl.c | |
parent | 38248b9d23f2dd91529d8b3c32ad8f5f3ec93950 (diff) | |
download | perl-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |