On Feb 12, 2008, at 12:09 AM, Dagfinn Ilmari Mannsåker wrote:

Hi all,

Castaway mentioned the idea of having components defined entirely by
config entries, without the need for any actual class files on disk, and
I was bored, so I went ahead and implemented it.

For each config key matching ^([MVC]|Model|View|Controller):: it checks
if the corresponding component already exists, and if it doesn't it
creates it on the fly. The base class is set to
->config->{$component}->{base_class} if it exists, Catalyst:: $component
(with [MVC] expanded to the full component type) otherwise.

Here's the patch against 5.70/trunk, feedback welcome.

<snip>

Looks interesting. I'm dynamically registering a large number of actions based on configuration entries. This is a great simplification, but also seems like a bit of a hack. I'm overriding render_actions() to accomplish this.

I just took a cursory look at your patch. It doesn't handle seeding dynamically registered actions with coderefs, it's just intended to create the appropriate components, correct?

Todd


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to