further doc updates.
Marcus Ramberg [Thu, 18 May 2006 21:26:15 +0000 (21:26 +0000)]
missing changes change

Changes
lib/Catalyst.pm
lib/Catalyst/Component.pm

diff --git a/Changes b/Changes
index 2ef55bd..fd155be 100644 (file)
--- a/Changes
+++ b/Changes
@@ -28,6 +28,7 @@ This file documents the revision history for Perl extension Catalyst.
 5.68    2006-04-26 12:23:00
         - ConfigLoader: Updated to version 0.06
         - fixed undef warnings in uri_for() and uri_with()
+       - Fixed Catalyst::Test to report errors on failed Class load
 
 5.678   2006-04-24 12:30:00
         - Re-release of 5.67 without OSX metadata files.
index c894fed..768e013 100644 (file)
@@ -202,7 +202,9 @@ The following flags are supported:
 
 =head2 -Debug
 
-Enables debug output.
+Enables debug output. You can also force this setting from the system
+environment with CATALYST_DEBUG or <MYAPP>_DEBUG. The environment settings
+override the app, with <MYAPP>_DEBUG having highest priority.
 
 =head2 -Engine
 
@@ -319,6 +321,7 @@ sub stash {
     my $c = shift;
     if (@_) {
         my $stash = @_ > 1 ? {@_} : $_[0];
+       croak('stash takes a hash or hashref') unless ref $stash;
         while ( my ( $key, $val ) = each %$stash ) {
             $c->{stash}->{$key} = $val;
         }
@@ -488,7 +491,7 @@ Gets a L<Catalyst::Model> instance by name.
     $c->model('Foo')->do_stuff;
 
 If the name is omitted, it will look for a config setting 'default_model',
-or check if there is only one model, and forward to it if that's the case.
+or check if there is only one view, and return it if that's the case.
 
 =cut
 
@@ -590,6 +593,8 @@ sub component {
 
         $comp = $c->_comp_search($name);
         return $c->_filter_component( $comp, @_ ) if defined($comp);
+
+       croak("Unable to find component $name");
     }
 
     return sort keys %{ $c->components };
index 1b601fe..07202d3 100644 (file)
@@ -47,6 +47,20 @@ This is the universal base class for Catalyst components
 It provides you with a generic new() for instantiation through Catalyst's
 component loader with config() support and a process() method placeholder.
 
+=head1 ACCEPT_CONTEXT
+
+Catalyst components are normally initalized during server startup, either
+as a Class or a Instance. However, some compoents require information about
+the current request. To do so, they can implement an ACCEPT_CONTEXT method.
+
+The ACCEPT_CONTEXT method is called on the component as initalized at startup,
+with the current $c object, and should return itself. It can do whatever it 
+likes with $c, such as extracting a path to use in the component or something
+similar. 
+
+This call happens for every $c->comp/controller/model/view call.
+
+
 =head1 METHODS
 
 =head2 new($c)