Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread Matt S Trout
On Thu, Jun 07, 2007 at 04:36:41PM -0700, Maurice Aubrey wrote: > >Separating out the interrogation of the context and retrieval of data into > >the ACCEPT_CONTEXT is how you avoid loose coupling - and it also then means > >you know you have -one- method that requires a mocked $c to test rather > >

Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread Maurice Aubrey
Matt S Trout wrote: On Thu, Jun 07, 2007 at 03:12:10PM -0700, mla wrote: Matt S Trout wrote: On Thu, Jun 07, 2007 at 01:04:02PM -0700, mla wrote: Other than the fact you don't like the style, why is it bad? You don't like singletons? I'm not fond of any magic global if I can possibly avoid it

Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread Matt S Trout
On Thu, Jun 07, 2007 at 03:12:10PM -0700, mla wrote: > Matt S Trout wrote: > >On Thu, Jun 07, 2007 at 01:04:02PM -0700, mla wrote: > >>Other than the fact you don't like the style, why is it bad? > >>You don't like singletons? > > > >I'm not fond of any magic global if I can possibly avoid it - I f

Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread mla
Matt S Trout wrote: On Thu, Jun 07, 2007 at 01:04:02PM -0700, mla wrote: Other than the fact you don't like the style, why is it bad? You don't like singletons? I'm not fond of any magic global if I can possibly avoid it - I find it tends to encourage tight coupling of code and action at a dis

Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread Dave Rolsky
On Thu, 7 Jun 2007, Matt S Trout wrote: I'm not fond of any magic global if I can possibly avoid it - I find it tends to encourage tight coupling of code and action at a distance and makes testing and debugging messy. I agree. A singleton is basically a _very_ thin mask for a global. I prefe

Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread Matt S Trout
On Thu, Jun 07, 2007 at 01:04:02PM -0700, mla wrote: > Matt S Trout wrote: > >On Thu, Jun 07, 2007 at 03:55:16AM -0700, Jonathan Swartz wrote: > >>mia wrote: > >>>Matt S Trout wrote: > On Wed, Jun 06, 2007 at 02:18:33PM -0700, mla wrote: > >>>Assuming I'm not using threads, how would I hurt mys

Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread mla
Matt S Trout wrote: On Thu, Jun 07, 2007 at 03:55:16AM -0700, Jonathan Swartz wrote: mia wrote: Matt S Trout wrote: On Wed, Jun 06, 2007 at 02:18:33PM -0700, mla wrote: Assuming I'm not using threads, how would I hurt myself by subclassing Catalyst and supplying a MyApp->context that returns

Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread Matt S Trout
On Thu, Jun 07, 2007 at 03:55:16AM -0700, Jonathan Swartz wrote: > mia wrote: > >Matt S Trout wrote: > >> On Wed, Jun 06, 2007 at 02:18:33PM -0700, mla wrote: > >>> Matt S Trout wrote: > On Wed, Jun 06, 2007 at 12:29:12PM -0700, mla wrote: > > Is it not possible to offer the current Cataly

Re: [Catalyst] plugins; was Re: debug mode

2007-06-07 Thread Jonathan Swartz
mia wrote: >Matt S Trout wrote: >> On Wed, Jun 06, 2007 at 02:18:33PM -0700, mla wrote: >>> Matt S Trout wrote: On Wed, Jun 06, 2007 at 12:29:12PM -0700, mla wrote: > Is it not possible to offer the current Catalyst instance through > a class method? Something analogous to Apache->req