[Catalyst] Obtaining better application speed during development

Matt S Trout dbix-class at trout.me.uk
Mon Mar 20 18:16:46 CET 2006


Nilson Santos Figueiredo Junior wrote:
> On 3/20/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>> You're welcome to try Apache::Reload, Module::Refresh and friends - I believe
>> provided you're using DBIx::Class rather than Class::DBI they work pretty
>> well, but bear in mind things like config changes and model setup events will
>> still need a full re-init to re-fire.
> 
> I think model setup seems a "harder" issue, but someone could pretty
> easily patch up a version of C::P::ConfigLoader which would check the
> config file's modified date and reload it accordingly.

But then you have to re-setup all the affected components.

And some components (e.g. Class::DBI stuff) rely on classdata so that may not 
work properly a second time. And some components may depend on other 
components, and you don't have any way to tell.

It becomes a lot easier at that point just to reload the app. *Although* you 
could try re-running ->setup entirely and see what happens. Not sure how well 
it would work, but it's probably worth playing with.

> Is this something desirable to be incorporated into ConfigLoader or as
> a standalone plugin?

I think it's probably more like a Plugin::RestartApp - that way you can have 
it happen off of HUPs and similar as well.

-- 
      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