PerlIO::utf8_strict is faster than the encoding layer.
"Plack::Middleware::FixMissingBodyInRedirect" => '0.09',
"Plack::Middleware::MethodOverride" => '0.12',
"Plack::Middleware::RemoveRedundantBody" => '0.03',
+ 'PerlIO::utf8_strict' => 0,
},
},
develop => {
use File::Copy ();
use IO::File ();
use File::Spec::Unix;
+use PerlIO::utf8_strict;
use namespace::clean -except => 'meta';
has filename => (is => 'rw');
my ($self, $layer) = @_;
my $fh = $self->fh;
- $layer = ":encoding(UTF-8)" if !$layer && $self->is_utf8_encoded;
+ $layer = ':utf8_strict' if !$layer && $self->is_utf8_encoded;
$layer = ':raw' unless $layer;
binmode($fh, $layer);