Subject: | [PATCH] Suppress ${^WARNING_BITS} warnings |
In 5.15.8-to-be, ${^WARNING_BITS} can sometimes be undef. Attached is a patch to stop
Class::Easy from triggering uninitialized warnings as a result.
Subject: | open_RpVssrOT.txt |
diff -rup Class-Easy-0.17-jVXYXM-orig/Import.pm.PL Class-Easy-0.17-jVXYXM/Import.pm.PL
--- Class-Easy-0.17-jVXYXM-orig/Import.pm.PL 2011-04-10 13:24:59.000000000 -0700
+++ Class-Easy-0.17-jVXYXM/Import.pm.PL 2012-02-02 16:44:14.000000000 -0800
@@ -8,7 +8,6 @@ our $H;
BEGIN {
$H = $^H;
- $WARN = ${^WARNING_BITS};
}
use utf8;
@@ -24,7 +23,7 @@ no warnings qw(exec newline unopened);
BEGIN {
$H = $^H & ~$H;
- $WARN = ${^WARNING_BITS} & ~$WARN;
+ $WARN = ${^WARNING_BITS};
}
print "package Class::Easy::Import;
@@ -36,7 +35,7 @@ printf "our \$WARN = \"%s\";\n\n", join
print "sub import {
# use warnings
- \${^WARNING_BITS} ^= \${^WARNING_BITS} ^ \$WARN;
+ \${^WARNING_BITS} = \$WARN;
# use strict, use utf8;
\$^H |= \$H;
diff -rup Class-Easy-0.17-jVXYXM-orig/blib/lib/Class/Easy/Import.pm Class-Easy-0.17-jVXYXM/blib/lib/Class/Easy/Import.pm
--- Class-Easy-0.17-jVXYXM-orig/blib/lib/Class/Easy/Import.pm 2012-02-02 16:21:15.000000000 -0800
+++ Class-Easy-0.17-jVXYXM/blib/lib/Class/Easy/Import.pm 2012-02-02 16:44:30.000000000 -0800
@@ -1,11 +1,11 @@
package Class::Easy::Import;
our $H = 0x820600;
-our $WARN = "";
+our $WARN = "\x3c\x3f\x33\x00\x0f\xf0\x0f\xc0\xf0\xfc\x33\x00\x00";
sub import {
# use warnings
- ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ $WARN;
+ ${^WARNING_BITS} = $WARN;
# use strict, use utf8;
$^H |= $H;
diff -rup Class-Easy-0.17-jVXYXM-orig/lib/Class/Easy.pm Class-Easy-0.17-jVXYXM/lib/Class/Easy.pm
--- Class-Easy-0.17-jVXYXM-orig/lib/Class/Easy.pm 2011-06-14 02:21:42.000000000 -0700
+++ Class-Easy-0.17-jVXYXM/lib/Class/Easy.pm 2012-02-02 16:25:27.000000000 -0800
@@ -57,7 +57,7 @@ sub import {
my %params = @_;
# use warnings
- ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ $Class::Easy::Import::WARN;
+ ${^WARNING_BITS} = $Class::Easy::Import::WARN;
# use strict, use utf8;
$^H |= $Class::Easy::Import::H;