Skip Menu |

This queue is for tickets about the Alvis-Bags CPAN distribution.

Report information
The Basics
Id: 117594
Status: open
Priority: 0/
Queue: Alvis-Bags

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.3
Fixed in: (no value)



Subject: The encoding pragma is no longer supported
Module compilation fails with bleadperl (e.g. perl 5.25.4): PERL_DL_NONLAZY=1 "/bbbike/perl-5.25.4/bin/perl5.25.4" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # Failed test 'use Alvis::URLs;' # at t/001_load.t line 8. # Tried to use 'Alvis::URLs'. # Error: The encoding pragma is no longer supported at /tmpfs/.cpan-build-cpansand/2016090718/Alvis-Bags-0.3-0/blib/lib/Alvis/URLs.pm line 17. # BEGIN failed--compilation aborted at /tmpfs/.cpan-build-cpansand/2016090718/Alvis-Bags-0.3-0/blib/lib/Alvis/URLs.pm line 17. # Compilation failed in require at t/001_load.t line 8. # BEGIN failed--compilation aborted at t/001_load.t line 8. # Looks like you failed 1 test of 1. t/001_load.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests
On Wed Sep 07 15:51:23 2016, SREZIC wrote: Show quoted text
> Module compilation fails with bleadperl (e.g. perl 5.25.4): > > PERL_DL_NONLAZY=1 "/bbbike/perl-5.25.4/bin/perl5.25.4" "- > MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef > *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" > t/*.t > > # Failed test 'use Alvis::URLs;' > # at t/001_load.t line 8. > # Tried to use 'Alvis::URLs'. > # Error: The encoding pragma is no longer supported at > /tmpfs/.cpan-build-cpansand/2016090718/Alvis-Bags-0.3- > 0/blib/lib/Alvis/URLs.pm line 17. > # BEGIN failed--compilation aborted at /tmpfs/.cpan-build- > cpansand/2016090718/Alvis-Bags-0.3-0/blib/lib/Alvis/URLs.pm line 17. > # Compilation failed in require at t/001_load.t line 8. > # BEGIN failed--compilation aborted at t/001_load.t line 8. > # Looks like you failed 1 test of 1. > t/001_load.t .. > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/1 subtests
The attached patch is likely to fix it. Not having mpca I am not able to test it fully. It uses pragmata that are supported which provide more or less the same functionality. The one feature that encoding.pm provided that is not supported anymore was for raw utf-8 bytes in a string to be considered equivalent to the corresponding Unicode character (i.e., automatic encoding and decoding of strings without warning). If any part of the code needs to consider, e.g., "\xc4\x80" equivalent to "\x{100}", then it will break and will need reworking. The code should probably use Unicode characters (\x{100}) exclusively. I believe it already does so and that the patch will work.
Subject: open_FnPHahAX.txt
diff -rup Alvis-Bags-0.3-0-orig/lib/Alvis/URLs.pm Alvis-Bags-0.3-0/lib/Alvis/URLs.pm --- Alvis-Bags-0.3-0-orig/lib/Alvis/URLs.pm 2016-09-10 18:43:53.000000000 -0700 +++ Alvis-Bags-0.3-0/lib/Alvis/URLs.pm 2016-09-10 18:44:17.000000000 -0700 @@ -14,8 +14,8 @@ use Encode; use URI; # encoding pragmas follow any includes like "use" -use encoding 'utf8'; -use open ':utf8'; +use utf8; +use open ':std', ':utf8'; # return 32-bit unsigned sub easyhash32