Skip Menu |

This queue is for tickets about the Lingua-ZH-MMSEG CPAN distribution.

Report information
The Basics
Id: 117318
Status: open
Priority: 0/
Queue: Lingua-ZH-MMSEG

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

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



Subject: The encoding pragma is no longer supported
Compilation of the module fails with bleadperl (e.g. perl 5.25.4): # Failed test 'use Lingua::ZH::MMSEG;' # at t/000-load.t line 5. # Tried to use 'Lingua::ZH::MMSEG'. # Error: The encoding pragma is no longer supported at /tmpfs/.cpan-build-cpansand/2016082921/Lingua-ZH-MMSEG-0.4005-0/blib/lib/Lingua/ZH/MMSEG.pm line 6. # BEGIN failed--compilation aborted at /tmpfs/.cpan-build-cpansand/2016082921/Lingua-ZH-MMSEG-0.4005-0/blib/lib/Lingua/ZH/MMSEG.pm line 6. # Compilation failed in require at t/000-load.t line 5. # BEGIN failed--compilation aborted at t/000-load.t line 5. # Looks like you failed 1 test of 1. t/000-load.t ... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests
On Tue Aug 30 01:29:06 2016, SREZIC wrote: Show quoted text
> Compilation of the module fails with bleadperl (e.g. perl 5.25.4): > > # Failed test 'use Lingua::ZH::MMSEG;' > # at t/000-load.t line 5. > # Tried to use 'Lingua::ZH::MMSEG'. > # Error: The encoding pragma is no longer supported at > /tmpfs/.cpan-build-cpansand/2016082921/Lingua-ZH-MMSEG-0.4005- > 0/blib/lib/Lingua/ZH/MMSEG.pm line 6. > # BEGIN failed--compilation aborted at /tmpfs/.cpan-build- > cpansand/2016082921/Lingua-ZH-MMSEG-0.4005- > 0/blib/lib/Lingua/ZH/MMSEG.pm line 6. > # Compilation failed in require at t/000-load.t line 5. > # BEGIN failed--compilation aborted at t/000-load.t line 5. > # Looks like you failed 1 test of 1. > t/000-load.t ... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/1 subtests
Please read what I wrote in <https://rt.cpan.org/Ticket/Display.html?id=117317#txn-1663549>. The same applies here. Removing ‘use encoding 'utf8';’ will enable the module to work. Indeed, all tests pass. But if you want the callers to continue to be able to feed raw utf-8 bytes (e.g., "\xe7\x8f\xbe" instead of "\N{U+73FE}" for 現), you will need to do utf8::decode($thing) on the input.