On 12/8/06, Kevin Old <[EMAIL PROTECTED]> wrote:
On 12/8/06, Jon Warbrick <[EMAIL PROTECTED]> 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

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to