removed CE::PSGI from author deps testing
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Plugin / Unicode / Encoding.pm
index ca2dbd5..022efd2 100644 (file)
@@ -23,6 +23,10 @@ sub encoding {
         if (my $wanted = shift)  {
             $encoding = Encode::find_encoding($wanted)
               or Carp::croak( qq/Unknown encoding '$wanted'/ );
+            binmode(STDERR, ':encoding(' . $encoding->name . ')');
+        }
+        else {
+            binmode(STDERR);
         }
 
         $encoding = ref $c
@@ -130,12 +134,12 @@ sub setup {
 
     my $conf = $self->config;
 
-    # Allow an explict undef encoding to disable default of utf-8
+    # Allow an explicit undef encoding to disable default of utf-8
     my $enc = delete $conf->{encoding};
     $self->encoding( $enc );
 
     return $self->next::method(@_)
-      unless $self->setup_finished; ## hack to stop possibily meaningless test fail... (jnap)
+      unless $self->setup_finished; ## hack to stop possibly meaningless test fail... (jnap)
 }
 
 sub _handle_unicode_decoding {