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.
=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
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;
}
$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
$comp = $c->_comp_search($name);
return $c->_filter_component( $comp, @_ ) if defined($comp);
+
+ croak("Unable to find component $name");
}
return sort keys %{ $c->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)