More ->config fixes + Changelog
Tomas Doran [Wed, 8 Jul 2009 22:12:29 +0000 (22:12 +0000)]
Changes
lib/Catalyst/Component.pm
lib/Catalyst/Request.pm

diff --git a/Changes b/Changes
index 3007774..1f7df0a 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,6 +3,8 @@
   Bug fixes:
        - Fix replace_constructor warning to actually work if you make your
          application class immutable without that option.
+       - Fix POD to refer to ->config(key => $val), rather than
+         ->config->{key} = $val, as the latter form is deprecated.
 
   Refactoring / cleanups:
        - Deleted the Restarter engine and its Watcher code. Use the
index f0a6d60..2decf10 100644 (file)
@@ -157,9 +157,10 @@ If this method is present (as it is on all Catalyst::Component subclasses,
 it is called by Catalyst during setup_components with the application class
 as $c and any config entry on the application for this component (for example,
 in the case of MyApp::Controller::Foo this would be
-MyApp->config->{'Controller::Foo'}). The arguments are expected to be a
-hashref and are merged with the __PACKAGE__->config hashref before calling
-->new to instantiate the component.
+C<< MyApp->config('Controller::Foo' => \%conf >>).
+The arguments are expected to be a hashref and are merged with the
+C<< __PACKAGE__->config >> hashref before calling C<< ->new >>
+to instantiate the component.
 
 You can override it in your components to do custom instantiation, using
 something like this:
index b16e59a..643a298 100644 (file)
@@ -473,7 +473,7 @@ Reads a chunk of data from the request body. This method is intended to be
 used in a while loop, reading $maxlength bytes on every call. $maxlength
 defaults to the size of the request if not specified.
 
-You have to set MyApp->config->{parse_on_demand} to use this directly.
+You have to set MyApp->config(parse_on_demand => 1) to use this directly.
 
 =head2 $req->referer
 
@@ -649,7 +649,7 @@ You may also pass an optional second parameter that puts C<uri_with> into
 append mode:
 
   $req->uri_with( { key => 'value' }, { mode => 'append' } );
-  
+
 See C<mangle_params> for an explanation of this behavior.
 
 =cut