[Catalyst] Configuring a Controller from the config file

Robert Sedlacek rs at 474.at
Wed Jul 30 13:22:16 BST 2008

Moritz Onken wrote:
> I tried to set some config options for a controller with the config file.
> YAML-code:
> ---
> name: MyApp
> Controller::Root:
>   key: value
> I'm using ConfigLoader and the debug shows that it successfully loaded 
> the yaml file.
> In a method in my Root controller I tried to access those config options 
> via $self->config.
> I had no luck. $c->config shows the hole config. I could access the 
> config options via
> $c->config->{Controller::Root} but shouldn't it avaiable via $self->config?
> What am I missing?

Here's some details:


hth, rs

More information about the Catalyst mailing list