FAQ

On Thu, 30 Nov 2006 21:35:41 +0000 Matt S Trout wrote:

Hideo Kimura wrote:
Hi,

Does anybody knows how to set config of each Controllers in YAML file?
Before I can do it following way with ConfigLoader, but it doesn't work now.

in yml file
Controller::Foo:
foo: bar

in controller
sub default : Private {
my ($self, $c) = @_;

my $config = $self->config;
...
}
That's wrong, the class config is the prototype.

__PACKAGE__->mk_accessors(qw/foo/);

sub default : Private {
my ($self, $c) = @_;
warn $self->foo; # bar
}
It works fine.
Thanks for your reply.

--
hide

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedNov 30, '06 at 8:16p
activeNov 30, '06 at 11:05p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Hideo Kimura: 2 posts Matt S Trout: 1 post

People

Translate

site design / logo © 2022 Grokbase