[Catalyst] Catalyst FormBuilder plugin on CPAN

Matt S Trout dbix-class at trout.me.uk
Sat Aug 19 16:38:49 CEST 2006

Nate Wiger wrote:
> Matt S Trout wrote:
>> Nate Wiger wrote:
>>> If you can send me a pointer to writing a controller base class, I'll 
>>> certainly check it out. I didn't consider this an option, to be honest. 
>>> I was trying to model it after XMLRPC, which is nice and easy to load 
>>> with its :XMLRPC attribute. But I'm open to other possibilities.
>> "Poke at Catalyst::Base" - each attr causes the _parse_Name_attr method to be 
>> invoked during which you can do as you will.
>> Catalyst::Plugin::XMLRPC is a complete disaster of a design cockup and 
>> considered *strongly* disrecommended. Catalyst::Plugin::Server obsoletes it so 
>> far as I'm concerned.
> Actually, I was talking about Server::XMLRPC - great module, again 
> implemented as a Plugin. It could be argued that it belongs as a 
> controller base class too, since it does alter the request cycle and add 
> an $c->xmlrpc (as well as even forward requests to different urls).

Server::XMLRPC is a plugin because it hooks into the dispatch cycle (and the 
authors and I only finally made it a plugin after lots of going round the 
houses and not finding an easier way to do it currently; going back and 
figuring one out is on the todo list)

Form handling doesn't need to do so, really, so it can go in as a base class 
just fine.

> Just to throw an idea out, the plugin architecture could be formalized 
> somewhat. Add a register_plugin() method, for example, that doesn't 
> allow more than one module to load into $c->{whatever}. A Plugin module 
> writer would use this to register their plugin.
> It could do some simple housekeeping and throw an exception like so:
>     Attempt to load Cat conflicts with already loaded plugin Dog
> Just a thought.

Yeah, except that there's also a lot of plugins that wrap methods rather than 
declaring them. We'd love to do this. How to do it Right is a different matter :)

      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

More information about the Catalyst mailing list