Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 101046
Status: resolved
Priority: 0/
Queue: Encode

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

Bug Information
Severity: (no value)
Broken in:
  • 2.67
  • 2.66
  • 2.68
Fixed in: 2.71



Subject: Test suite of 2.67 fails with perl 5.21.7
Download (untitled) / with headers
text/plain 397b
t/encoding.t ............... Failed 2/31 subtests ... Test Summary Report ------------------- t/encoding.t (Wstat: 0 Tests: 31 Failed: 2) Failed tests: 12, 14 Fail happens on a Debian/wheezy and FreeBSD 9.2 system. Interestingly "make test" of perl 5.21.7 went fine without errors on these systems, and the bundled Encode version seems to be the same... Regards, Slaven
Download (untitled) / with headers
text/plain 548b
On 2014-12-20 16:50:12, SREZIC wrote: Show quoted text
> t/encoding.t ............... > Failed 2/31 subtests > > ... > > Test Summary Report > ------------------- > t/encoding.t (Wstat: 0 Tests: 31 Failed: 2) > Failed tests: 12, 14 > > > Fail happens on a Debian/wheezy and FreeBSD 9.2 system. > > Interestingly "make test" of perl 5.21.7 went fine without errors on > these systems, and the bundled Encode version seems to be the same... >
See also http://matrix.cpantesters.org/?dist=Encode;perl=5.21.7;reports=1 for available fail reports.

Curious. Seems to be something in XS stuff.

 

Simply untarring and running `prove -blvr t/encoding.t` *without* doing a make run *passes* tests ( on blead ) ( and without warning )

However, doing `perl Makefile.PL && make` and then doing `prove -blvr t/encoding.t` makes it fail.

 

Where its triggering those warnings is the strangest thing:

 

PERL5OPT="-d:Confess" prove -blvr t/encoding.t     

But either way, I don't think the warnings are directly related to the problem, just a failure to include those warnings only when deprecations are warned about. ( I could be very wrong about that of course )

Attached however is the reduced and instrumented form of the failing parts of the test, and the output emitted:

t/encoding.t .. Setting ${^ENCODING} is deprecated at /home/kent/.cpanm/work/1423137170.272187/Encode-2.70/blib/lib/encoding.pm line 134.
        encoding::import("encoding", "greek") called at t/encoding.t line 5
        main::BEGIN() called at t/encoding.t line 5
        eval {...} called at t/encoding.t line 5

1..2
not ok 1
# expected: 223
# got: 943
not ok 2
# expected: 223
# got: 943
Failed 2/2 subtests

Removing the `use encoding 'greek' ` from the file makes these 2 tests pass.... but of course, make the rest of the file fail =)

Doing some diving shows this reduced test fails all the way back with encode 2.00 in the exact same way with the same warnings... so its somehow a "blead breaks cpan without breaking itself with modules that are shipped on CPAN".

Wut.

Subject: encoding_reduce.t
Download encoding_reduce.t
text/x-perl 692b
print "1..2\n"; no warnings "deprecated"; use encoding "greek"; # iso 8859-7 (no "latin" alias, surprise...) # charnames must still work use charnames ':full'; { my $expected = 0xdf; my $got = ord("\N{LATIN SMALL LETTER SHARP S}"); my $state = $got == $expected; print "not " unless $state; print "ok 1\n"; if ( not $state ) { print "# expected: $expected\n# got: $got\n"; } } # combine { my $c = "\xDF\N{LATIN SMALL LETTER SHARP S}" . chr(0xdf); my $expected = 0xdf; my $got = ord(substr($c, 1, 1)); my $state = $got == $expected; print "not " unless $state; print "ok 2\n"; if ( not $state ) { print "# expected: $expected\n# got: $got\n"; } }
Subject: encoding_tap.txt
Download encoding_tap.txt
text/plain 1010b
Setting ${^ENCODING} is deprecated at /home/kent/.cpanm/work/1423136354.224896/Encode-2.70/blib/lib/encoding.pm line 134. encoding::import("encoding", "latin1") called at t/encoding.t line 20 main::BEGIN() called at t/encoding.t line 20 eval {...} called at t/encoding.t line 20 Setting ${^ENCODING} is deprecated at /home/kent/.cpanm/work/1423136354.224896/Encode-2.70/blib/lib/encoding.pm line 134. encoding::import("encoding", "greek") called at t/encoding.t line 21 main::BEGIN() called at t/encoding.t line 21 eval {...} called at t/encoding.t line 21 t/encoding.t .. 1..31 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 not ok 12 ok 13 not ok 14 ok 15 ok 16 ok 17 ok 18 ok 19 ok 20 ok 21 ok 22 ok 23 ok 24 ok 25 ok 26 ok 27 ok 28 ok 29 ok 30 ok 31 Failed 2/31 subtests Test Summary Report ------------------- t/encoding.t (Wstat: 0 Tests: 31 Failed: 2) Failed tests: 12, 14 Files=1, Tests=31, 1 wallclock secs ( 0.05 usr 0.00 sys + 0.09 cusr 0.01 csys = 0.15 CPU) Result: FAIL
The relevant commits in bleadperl: commit c0659f7 Author: Karl Williamson <khw@cpan.org> AuthorDate: Wed Nov 19 17:02:58 2014 -0700 Commit: Karl Williamson <khw@cpan.org> CommitDate: Thu Nov 20 21:45:18 2014 -0700 perldelta for deprecating ${^ENCODING} commit a3ee04b Author: Karl Williamson <khw@cpan.org> AuthorDate: Wed Nov 19 16:49:53 2014 -0700 Commit: Karl Williamson <khw@cpan.org> CommitDate: Thu Nov 20 21:45:18 2014 -0700 perlvar: More text about ${^ENCODING}; refer by perldiag commit d5b4785 Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> AuthorDate: Mon Nov 10 23:54:46 2014 +0000 Commit: Karl Williamson <khw@cpan.org> CommitDate: Thu Nov 20 21:45:18 2014 -0700 Deprecate setting ${^ENCODING} The commiter added a no warnings in t/op/leaky-magic.t, and made other minor changes because of rebasing issues. commit 3e66930 Author: Karl Williamson <khw@cpan.org> AuthorDate: Tue Nov 18 17:03:03 2014 -0700 Commit: Karl Williamson <khw@cpan.org> CommitDate: Thu Nov 20 21:45:18 2014 -0700 Make encoding pragma lexical in scope The encoding pragma is deprecated, but in the meantime it causes spooky action at a distance with other modules that it may be combined with. In these modules, operations such as chr(), ord(), and utf8::upgrade() will suddenly start doing the wrong thing. The documentation for 'encoding' has said to call it after loading other modules, but this may be impractical. This is especially bad with anything that auto-loads at first use, like \N{} does now for charnames. There is an issue with combining this with setting the variable ${^ENCODING} directly. The potential for conflicts has always been there, and remains. This commit introduces a shadow hidden variable, subservient to ${^ENCODING} (to preserve backwards compatibility) that has lexical scope validity. The pod for 'encoding' has been revamped to be more concise, clear, use more idiomatic English, and to speak from a modern perspective.
Download (untitled) / with headers
text/plain 472b
On 2014-12-20 16:50:12, SREZIC wrote: Show quoted text
> t/encoding.t ............... > Failed 2/31 subtests > > ... > > Test Summary Report > ------------------- > t/encoding.t (Wstat: 0 Tests: 31 Failed: 2) > Failed tests: 12, 14 > > > Fail happens on a Debian/wheezy and FreeBSD 9.2 system. > > Interestingly "make test" of perl 5.21.7 went fine without errors on > these systems, and the bundled Encode version seems to be the same...
Seems to be fixed with 2.71.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.