X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=188162fb0018d519f6a8a5deb826cfa3cdc5f8ab;hp=898ad609d7f8d6bb504b968121939589ab87d47e;hb=19846a6023d3c26c60c07e048fea33fb2cd1d475;hpb=22e4231076a7be928a8889ca52eae42bd4b4cd57
diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm
index 898ad60..188162f 100644
--- a/lib/Catalyst.pm
+++ b/lib/Catalyst.pm
@@ -247,11 +247,6 @@ sub _application { $_[0] }
Catalyst - The Elegant MVC Web Application Framework
-=for html
-
-
-
=head1 SYNOPSIS
See the L distribution for comprehensive
@@ -475,7 +470,7 @@ or stash it like so:
and access it from the stash.
-Keep in mind that the C method used is that of the caller action. So a C<$c-Edetach> inside a forwarded action would run the C method from the original action requested.
+Keep in mind that the C method used is that of the caller action. So a C<< $c->detach >> inside a forwarded action would run the C method from the original action requested.
=cut
@@ -2322,6 +2317,10 @@ sub finalize_encoding {
(defined($res->body)) and
(ref(\$res->body) eq 'SCALAR')
) {
+ # if you are finding yourself here and your body is already encoded correctly
+ # and you want to turn this off, use $c->clear_encoding to prevent encoding
+ # at this step, or set encoding to undef in the config to do so for the whole
+ # application. See the ENCODING documentaiton for better notes.
$c->res->body( $c->encoding->encode( $c->res->body, $c->_encode_check ) );
# Set the charset if necessary. This might be a bit bonkers since encodable response
@@ -4307,18 +4306,20 @@ value to undef.
C
-When there is an error in an action chain, the default behavior is to continue
-processing the remaining actions and then catch the error upon chain end. This
-can lead to running actions when the application is in an unexpected state. If
-you have this issue, setting this config value to true will promptly exit a
-chain when there is an error raised in any action (thus terminating the chain
-early.)
+Defaults to true.
+
+When there is an error in an action chain, the default behavior is to
+abort the processing of the remaining actions to avoid running them
+when the application is in an unexpected state.
-use like:
+Before version 5.90070, the default used to be false. To keep the old
+behaviour, you can explicitely set the value to false. E.g.
- __PACKAGE__->config(abort_chain_on_error_fix => 1);
+ __PACKAGE__->config(abort_chain_on_error_fix => 0);
+
+If this setting is set to false, then the remaining actions are
+performed and the error is caught at the end of the chain.
-In the future this might become the default behavior.
=item *
@@ -4772,6 +4773,11 @@ the encoding configuration to undef.
This is recommended for temporary backwards compatibility only.
+To turn it off for a single request use the L
+method to turn off encoding for this request. This can be useful
+when you are setting the body to be an arbitrary block of bytes,
+especially if that block happens to be a block of UTF8 text.
+
Encoding is automatically applied when the content-type is set to
a type that can be encoded. Currently we encode when the content type
matches the following regular expression:
@@ -4894,7 +4900,7 @@ andrewalker: André Walker
Andrew Bramble
-Andrew Ford EA.Ford@ford-mason.co.ukE
+Andrew Ford
Andrew Ruthven
@@ -4918,7 +4924,7 @@ Danijel Milicevic C
davewood: David Schmidt
-David Kamholz Edkamholz@cpan.orgE
+David Kamholz
David Naughton, C