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.