[Catalyst] Mason configuration in YAML

Kevin Old kevinold at gmail.com
Fri Dec 8 19:32:30 GMT 2006


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.

Kevin
-- 
Kevin Old
kevinold at gmail.com



More information about the Catalyst mailing list