[Catalyst] plugins; was Re: debug mode

mla maurice.aubrey at gmail.com
Thu Jun 7 21:04:02 GMT 2007


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
>>> the current catalyst context?
>> Yes, I'd like to know more about this too please. Mason has a similar  
>> construct - HTML::Mason::Request->instance() - and it works fine with  
>> Mason subrequests or recursive calls to an entirely different Mason  
>> interpreter. It just returns the value of a dynamically scoped  
>> variable that is set at the beginning of a Mason request.
> 
> If you like that style, load Catalyst::Plugin::Singleton and enjoy. I don't
> but I'm not the arbiter of bad code :)

Cool, that's exactly what I was hoping for.

Other than the fact you don't like the style, why is it bad?
You don't like singletons?



More information about the Catalyst mailing list