3 - Bug ->go or ->visit causes actions which have Args or CaptureArgs called
4 twice when called via ->go or ->visit.
6 Test app: http://github.com/bobtfish/catalyst-app-bug-go_chain/tree/master
8 # Compatibility warnings to add:
10 - $self->config should warn as config should only ever be called as a
13 # Proposed functionality / feature additions:
15 ## Log setup needs to be less lame
17 So Catalyst::Plugin::Log::* can die
18 in a fire. Having $c->log_class would be a good start. kane volunteered
21 Simple example: Catalyst::Plugin::Log::Colorful should just be a
22 subclass of Catalyst::Log, no ::Plugin:: needed.
24 See also: Catalyst::Plugin::Log::Dispatch and
25 http://github.com/willert/catalyst-plugin-log4perl-simple/tree
27 ## Capture arguments that the plack engine component was run with somewhere,
28 to more easily support custom args from scripts (e.g. Gitalist's
31 ## throw away the restarter and allow using the restarters Plack provides
33 ## remove per-request state from the engine instance
35 ## be smarter about how we use PSGI - not every response needs to be delayed
38 # The horrible hack for plugin setup - replacing it:
40 * Have a look at the Devel::REPL BEFORE_PLUGIN stuff
41 I wonder if what we need is that combined with plugins-as-roles
45 ## To do at release time
47 - Release psgi branch of Catalyst-Devel
48 - Release new Task::Catalyst
49 - Release 5.9 branch of Catalyst-Manual
50 - Release Catalyst::Engine::HTTP::Prefork with deprecation notice
51 + exit in Makefile.PL if Catalyst > 5.89 is installed.
55 * I've noticed a small difference with Catalyst::Test. The latest stable
56 version include two headers, 'host' and 'https'. They are missing from
57 this version - Pedro Melo on list
58 ^^ Cannot replicate this? Mailed back to ask for tests..
62 NOTE - these are notes that t0m thought up after doing back compat for
63 catalyst_component_class, may be inaccurate, wrong or missing things
64 bug mst (at least) to correct before trying more than the first 2
65 steps. Please knock yourself out on the first two however :)
67 - Eliminate actions in MyApp from the main test suite
68 - Uncomment warning in C::C::register_action_methods, add tests it works
69 by mocking out the logging..
70 - Remove MyApp @ISA controller (ask metaclass if it has attributes, and if
71 so you need back compat :/)
72 - Make Catalyst::Context, move the per request stuff in there, handles from
73 main app class to delegate
74 - Make an instance of the app class which is a global variable
75 - Make new instance of the context class, not the app class per-request
76 - Remove the components as class data, move to instance data on the app
77 class (you probably have to do this for _all_ the class data, good luck!)
78 - Make it possible for users to spin up different instances of the app class
79 (with different config etc each)
80 - Profit! (Things like changing the complete app config per vhost, i.e.
81 writing a config loader / app class role which dispatches per vhost to
82 differently configured apps is piss easy)
86 ### Final steps for GSOC
88 ##### Things that work:
90 - the default container loads all components, calls ACCEPT_CONTEXT() when appropriate, and COMPONENT() when appropriate, behaving like current Catalyst does
92 - its possible to create a custom container, and override the components you want. Lifecycle, class, dependencies, all overridable.
94 - config files are loaded without Catalyst::Plugin::ConfigLoader
96 - per request life cycle somewhat works
98 - external modules are loaded just using a custom container, much like Catalyst::Model::Adaptor
100 ##### Things that don't work:
102 - expand_component_module
104 - sugar is still not completely implemented
107 - wrappers around setup_component, setup_components, locate_components in Catalyst.pm
108 - $instance->expand_modules
110 - Crazy tests for things such as:
113 *${appclass}::Model::TopLevel::GENERATED::ACCEPT_CONTEXT = sub { ... };
117 ##### Need planning, have questions:
119 - per request life cycle
121 - sugar - we should discuss the syntax with rafl and edenc
123 - when / when not COMPONENT should be called
125 - locate_components service vs setup_components method
126 - can we be more lazy?
127 - should setup_components be a service that things like the ->component lookup
130 - There are a few more FIXMEs, idk if any relevant here
132 ### Next steps - planned:
134 - some imports need to get the importing package in Catalyst::IOC
135 - done - needs testing
137 - Back compat for Catalyst.pm moved methods (locate_components)
138 - done - needs testing
140 - Test custom container
141 - writing some tests which verify that the models you think should be
142 there are there, and that they received their dependencies as arguments
143 - i.e. Model::Bar should get params { foo => $model_foo } when being
145 - Need to test that if you have a standard component Frotz
146 and a customized component Fnar, and Fnar depends on Frotz
147 - And yeah, some tests that the customised components actually work via
148 $c->model('Foo'), and that COMPONENT is called (or not called)
149 as appropiate and that ACCEPT_CONTEXT is called (or not) as appropriate
151 ### Next steps - less planned:
153 - make ACCEPT_CONTEXT and COMPONENT optional in Catalyst::IOC::BlockInjection and Catalyst::IOC::ConstructorInjection
154 - Create COMPONENTSingleton life cycle
156 - Creating service()-like sugar for component
158 - Test cases for extending the container in an application.
159 - Using the sugar added in the previous item
160 - Test when Model::Foo depends_on Model::Bar
161 - Test for component Foo => ( lifecycle => 'Singleton', class => 'My::External::Class', dependencies => { config => depends_on("config") } )
162 - Fix ^^ so that you can get your component's namespaced config nicely.
164 - Tests for using the container outside of Catalyst
165 - Custom container which adds some (very simple) services which are initialized from
166 the application config file (note plain services, not components)
167 - Depend on (and test) these inside Catalyst
168 - Test loading container outside Catalyst, and these services working
169 - Test Catalyst / MyApp is not loaded
171 #### Extending my app, notes
173 Basically try to implement something like this (starting out without the sugar!), and see how it breaks
174 and what needs to be done to fix it!
176 ##### Eventual syntax
178 package MyApp::Container;
181 container $self, as {
182 container model => as {
183 component Foo => (); # As per default!
184 component Bar => (dependencies => ['/model/Foo']); # Magic!
185 component Baz => ( lifecycle => 'InstancePerContext );
186 component Quux => ( lifecycle => 'Singleton' ); # ACCEPT_CONTEXT not called
187 # Catalyst::Model::Adaptor example
188 conponent Fnar => ( lifecycle => 'Singleton', class => 'My::External::Class', dependencies => { config => depends_on('config')} );
189 # ^^ FIXME - gets whole config, not Model::Foo
190 # There should be a 'nice' way to get the 'standard' config
192 # Note - implementation of BB may need to be changed to support making sure existing
193 # services actually get overridden. not sure how the default container behaves when doing that
194 # above code would build the constructor injection as it currently does,
195 # defaulting to the class name in the right namespace as declared by the surrounding container
196 # as well as adding using the catalyst-specific service class