ifeq ($(os), Darwin)
CPPFLAGS += -DOS_MACOSX
endif
t/00-load.t ........ 1/2
# Failed test 'use IO::Compress::Brotli;'
# at t/00-load.t line 8.
# Tried to use 'IO::Compress::Brotli'.
# Error: Can't load '/root/IO-Compress-Brotli/blib/arch/auto/IO/Compress/Brotli/Brotli.so' for module IO::Compress::Brotli: /root/IO-Compress-Brotli/blib/arch/auto/IO/Compress/Brotli/Brotli.so: Undefined symbol "BrotliEncoderCreateInstance" at /usr/local/lib/perl5/5.28/mach/DynaLoader.pm line 193.
# at /root/IO-Compress-Brotli/blib/lib/IO/Uncompress/Brotli.pm line 14.
# Compilation failed in require at /root/IO-Compress-Brotli/blib/lib/IO/Compress/Brotli.pm line 8.
# BEGIN failed--compilation aborted at /root/IO-Compress-Brotli/blib/lib/IO/Compress/Brotli.pm line 8.
# Compilation failed in require at t/00-load.t line 8.
# BEGIN failed--compilation aborted at t/00-load.t line 8.
# Failed test 'use IO::Uncompress::Brotli;'
# at t/00-load.t line 9.
# Tried to use 'IO::Uncompress::Brotli'.
# Error: Attempt to reload IO/Uncompress/Brotli.pm aborted.
# Compilation failed in require at t/00-load.t line 9.
# BEGIN failed--compilation aborted at t/00-load.t line 9.
# Looks like you failed 2 tests of 2.
t/00-load.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests
t/01-uncompress.t .. Can't load '/root/IO-Compress-Brotli/blib/arch/auto/IO/Compress/Brotli/Brotli.so' for module IO::Compress::Brotli: /root/IO-Compress-Brotli/blib/arch/auto/IO/Compress/Brotli/Brotli.so: Undefined symbol "BrotliEncoderCreateInstance" at /usr/local/lib/perl5/5.28/mach/DynaLoader.pm line 193.
at /root/IO-Compress-Brotli/blib/lib/IO/Uncompress/Brotli.pm line 14.
Compilation failed in require at t/01-uncompress.t line 8.
BEGIN failed--compilation aborted at t/01-uncompress.t line 8.
# Looks like your test exited with 2 before it could output anything.
t/01-uncompress.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 84/84 subtests
t/02-roundtrip.t ... Can't load '/root/IO-Compress-Brotli/blib/arch/auto/IO/Compress/Brotli/Brotli.so' for module IO::Compress::Brotli: /root/IO-Compress-Brotli/blib/arch/auto/IO/Compress/Brotli/Brotli.so: Undefined symbol "BrotliEncoderCreateInstance" at /usr/local/lib/perl5/5.28/mach/DynaLoader.pm line 193.
at /root/IO-Compress-Brotli/blib/lib/IO/Uncompress/Brotli.pm line 14.
Compilation failed in require at /root/IO-Compress-Brotli/blib/lib/IO/Compress/Brotli.pm line 8.
BEGIN failed--compilation aborted at /root/IO-Compress-Brotli/blib/lib/IO/Compress/Brotli.pm line 8.
Compilation failed in require at t/02-roundtrip.t line 8.
BEGIN failed--compilation aborted at t/02-roundtrip.t line 8.
# Looks like your test exited with 2 before it could output anything.
t/02-roundtrip.t ... Dubious, test returned 2 (wstat 512, 0x200)
Failed 114/114 subtests
Test Summary Report
-------------------
t/00-load.t (Wstat: 512 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 2
t/01-uncompress.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 84 tests but ran 0.
t/02-roundtrip.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 114 tests but ran 0.
Files=3, Tests=2, 0 wallclock secs ( 0.05 usr 0.02 sys + 0.36 cusr 0.05 csys = 0.47 CPU)
Result: FAIL
Failed 3/3 test programs. 2/2 subtests failed.
*** Error code 2
и получить имя кодировки my $charset = Encode::Detect::Detector::detect( $text );
а дальше можно энкодить например или по ситуации. Возможно у тебя в дургом модуле/классе уже есть энкодинг и получается, что два раза в utf8 перегоняется. Я сам долго с этим мучался(