polettix/www-mechanize — comment on commit 1cd9eb367403db303879b69b83e784a66a4e2f5b
File:  line 0
By polettix:

Hi Max,

it's actually already there, only using the "binmode" parameter. What
binary does is set the binmode to ":raw" and get the content only after
applying Content-Encoding headers unroll but without applying any
payload-specific charset.

You can see the added documentation here:

https://github.com/polettix/www-mechanize/commit/1cd9eb367403db303879b69b83e784a66a4e2f5b#lib/WWW/Mechanize.pm

Comments are welcome of course. Instead of using a scalar reference I might
just test for binmode parameter to start with ":".

Cheers,

Flavio.

On Sun, Jan 22, 2012 at 11:14 AM, Max Maischein <
reply@reply.github.com
> wrote:

> I think in addition to
>
> binary => 1
>
> it would make sense to allow forcing the actual argument to binmode,
> by allowing any string:
>
> binary => ':utf8'
> binary => ':encoding(UTF-8)'
>
> binary => ':bytes'
>
> and
>
> binary => ':raw'
>
> (which is identical to binary => 1)
>
> Could you add that feature as well?
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/polettix/www-mechanize/commit/1cd9eb367403db303879b69b83e784a66a4e2f5b#commitcomment-889629
>