update distar url
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Response / Writer.pm
index 55cbdd1..864e5cd 100644 (file)
@@ -5,7 +5,7 @@ sub close { shift->{_writer}->close }
 
 sub write_encoded {
   my ($self, $line) = @_;
-  if((my $enc = $self->{_encoding}) && $self->{_requires_encoding}) {
+  if((my $enc = $self->{_context}->encoding) && $self->{_requires_encoding}) {
     # Not going to worry about CHECK arg since Unicode always croaks I think - jnap
     $line = $enc->encode($line);
   }
@@ -13,7 +13,7 @@ sub write_encoded {
   $self->write($line);
 }
 
-=head1 TITLE 
+=head1 NAME
 
 Catalyst::Response::Writer - Proxy over the PSGI Writer
 
@@ -45,7 +45,7 @@ These delegate to the underlying L<PSGI> writer object
 
 =head2 write_encoded
 
-If the application defines a response encoding (default is UTF8) and the 
+If the application defines a response encoding (default is UTF8) and the
 content type is a type that needs to be encoded (text types like HTML or XML and
 Javascript) we first encode the line you want to write.  This is probably the
 thing you want to always do.  If you use the L<\write> method directly you will