Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 91971
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
zefram [...] fysh.org
Cc:
AdminCc:

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



Subject: encoding problems in tests
Date: Thu, 9 Jan 2014 14:39:14 +0000
To: bug-WWW-Mechanize [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
WWW-Mechanize's test suite generates a bunch of warnings of the form Use of the encoding pragma is deprecated at /opt/perl-5.18.2/cpan/build/WWW-Mechanize-1.73-r6sVCA/t/local/log-server line 6. The attached patch reexpresses the tests using purely ASCII source, so that no encoding pragma or I/O layer is needed. However, you'll notice that to make the tests work as they did before t/local/log-server needs to encode its $body string in UTF-8 *and* upgrade it. This was the overall effect of having an encoding pragma in that file's code and then explicitly pushing another encoding layer onto the DATA filehandle. Apparently t/local/get.t is relying on this double encoding. This is a bug, distinct from the use of the deprecated encoding pragma. -zefram

Message body is not shown because sender requested not to inline it.

This is a problem for 5.21.x, which might remove the encoding pragma entirely. I've tried this: use if $] < 5.012, encoding => 'iso8859-1'; use if $] >= 5.012, feature => 'unicode_strings'; and also re-encoding the relevant files from latin1 to utf8, but tests still fail. It appears that the code itself is not properly handling multibyte encoding/decoding at the boundaries properly. see also https://rt.perl.org/Ticket/Display.html?id=122121
5.22.0 is now out, with the deprecation warning.
RT-Send-CC: zefram [...] fysh.org
Thanks, released in 1.75.