[Catalyst] Mason configuration in YAML

Brandon Black blblack at gmail.com
Fri Dec 8 23:45:48 GMT 2006


On 12/8/06, Kevin Old <kevinold at gmail.com> wrote:
> On 12/8/06, Jon Warbrick <jw35 at cam.ac.uk> wrote:
> > On Thu, 7 Dec 2006, Kevin Old wrote:
> >
> > > ...
> > > then in Mason.pm you can use it like this:
> > > package MyApp::View::Mason;
> > >
> > > use base 'Catalyst::View::Mason';
> > >
> > > __ PACKAGE__->config->{DEBUG} = 'all';
> > > __ PACKAGE__->config->{comp_root} = $c->config->{comp_root};
> > > __ PACKAGE__->config->{data_dir} = $c->config->{data_dir};
> >
> > Er, can you? Where do you get $c from?
>
> You can using Catalyst::Plugin::Singleton (it'll give you a copy of
> $c).  Did it in some old code late last year with Catalyst, so I'm not
> sure if this practice is supported anymore.
>

Catalyst::Plugin::Singleton is generally considered to be a Bad Thing.
 If something you're doing seems to require using it, that should
smell like a design problem.

-- Brandon



More information about the Catalyst mailing list