Subject: | [PATCH] Stop using encoding.pm |
encoding.pm is no longer supported in bleadperl (5.25.3).
It turns out that the module does not need to ‘use encoding’, since the code only contains ASCII characters (I did not check thoroughly; I just did a quick visual scan). Also, use of the pragma like that would change the layers applied to STDIN and STDOUT, which a module should not be doing.
The two tests already have ‘use utf8’, so the code will run fine without ‘use encoding 'utf8'’. The only difference is that diagnostic output when tests fail with result in ‘Wide character’ warnings, which may not be desirable, but things will still function correctly.
With the attached patch, all tests pass with bleadperl.
Subject: | open_aUNhlOSf.txt |
diff -rup Time-Verbal-1.0.0-E9BgMu/lib/Time/Verbal.pm Time-Verbal-1.0.0-0/lib/Time/Verbal.pm
--- Time-Verbal-1.0.0-E9BgMu/lib/Time/Verbal.pm 2011-04-29 05:48:58.000000000 -0700
+++ Time-Verbal-1.0.0-0/lib/Time/Verbal.pm 2016-07-15 16:10:03.000000000 -0700
@@ -3,7 +3,6 @@ package Time::Verbal;
use strict;
use warnings;
-use encoding 'utf8';
use Object::Tiny qw(locale);
use File::Spec;
use Locale::Wolowitz;
diff -rup Time-Verbal-1.0.0-E9BgMu/t/i18n_dir.t Time-Verbal-1.0.0-0/t/i18n_dir.t
--- Time-Verbal-1.0.0-E9BgMu/t/i18n_dir.t 2011-04-29 05:48:58.000000000 -0700
+++ Time-Verbal-1.0.0-0/t/i18n_dir.t 2016-07-15 16:08:46.000000000 -0700
@@ -2,7 +2,6 @@
use strict;
use warnings;
use utf8;
-use encoding 'utf8';
use Test::More;
use Time::Verbal;
diff -rup Time-Verbal-1.0.0-E9BgMu/t/l10n.t Time-Verbal-1.0.0-0/t/l10n.t
--- Time-Verbal-1.0.0-E9BgMu/t/l10n.t 2011-04-29 05:48:58.000000000 -0700
+++ Time-Verbal-1.0.0-0/t/l10n.t 2016-07-15 16:08:42.000000000 -0700
@@ -5,7 +5,6 @@ use Test::More;
use Test::Exception;
use Time::Verbal;
use utf8;
-use encoding 'utf8';
my $now = time;