From: John Napiorkowski Date: Mon, 24 Aug 2015 16:26:52 +0000 (-0500) Subject: adding docs X-Git-Tag: 5.90100^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=f4d7cf1e0b763ba80f83a4c48edf7173ad250a46 adding docs --- diff --git a/Changes b/Changes index ecd3bca..374b9aa 100644 --- a/Changes +++ b/Changes @@ -7,10 +7,8 @@ - Change the way the stash middleware works to no longer localize $psgi_env. - If you delegate control to a sub Catalyst application, that application may now return information to the parent application via the stash. - -5.90098 - 2015-08-11 - Fix for RT#106373 (Issue when you try to install and also have an old - verion of Test::Mechanize::WWW::Catalyst) + version of Test::Mechanize::WWW::Catalyst) 5.90097 - 2015-07-28 - $c->uri_for now defines a final argument for setting the URL fragment diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index 0952b76..01e38f5 100644 --- a/lib/Catalyst/Component.pm +++ b/lib/Catalyst/Component.pm @@ -289,6 +289,14 @@ And in a controller: my $type = $c->model('FooFactory', 1,2,3,4): # $type->isa('Type1') +B If you define a ACCEPT_CONTEXT method it MUST check to see if the +second argument is blessed (is a context) or not (is an application class name) and +it MUST return something valid for the case when the scope is application. This is +required because a component maybe be called from the application scope even if it +requires a context and you must prevent errors from being issued if this happens. +Remeber not all components that ACCEPT_CONTEXT actually need or use context information +(and there is a school of thought that suggestions doing so is a design error anyway...) + =head1 SEE ALSO L, L, L, L.