sharyanto/perl-File-Write-Rotate — pull request #1 by mendel (2014-07-09 08:46:59+00:00)
Title: Support for 'binmode' (to set PerlIO layers, esp. encoding).

When logging UTF-8 encoded messages with Log::Dispatch::FileWriteRotate, we receive warnings like this:

Wide character in print at /.../File/Write/Rotate.pm line 277, <$file> line 35.

The solution would be to set the PerlIO layer on the underlying filehandle to something that matches the encoding of the messages (ie. ':utf8' or ':encoding(UTF-8)'). This commit makes that possible.

I chose the 'binmode' name for the attribute so that it would be consistent with Log::Dispatch::FileRotate / Log::Dispatch::File (and also b/c that's what it does under the hood).