]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commitdiff
context_info() should ignore %warnings::Bits until perl 5.8.7
authorVincent Pit <vince@profvince.com>
Fri, 4 Jan 2013 12:26:18 +0000 (13:26 +0100)
committerVincent Pit <vince@profvince.com>
Fri, 4 Jan 2013 12:26:18 +0000 (13:26 +0100)
Just like what caller() does.

Upper.xs

index 7d75d5fd944c37ba94b6c7ed3b15e2b34f85cb58..46dc5931efb657df2f86da4ca689cb5e48ed4ffa 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -2680,12 +2680,14 @@ context_info_warnings_off:
   } else if (old_warnings == pWARN_ALL) {
    HV *bits;
 context_info_warnings_on:
+#if SU_HAS_PERL(5, 8, 7)
    bits = get_hv("warnings::Bits", 0);
    if (bits) {
     SV **bits_all = hv_fetchs(bits, "all", FALSE);
     if (bits_all)
      mask = sv_mortalcopy(*bits_all);
    }
+#endif
    if (!mask)
     mask = su_newmortal_pvn(WARN_ALLstring, WARNsize);
   } else {