Oleg Pronin wrote:
I use many actions that take params from config in runtime, for example
sub pay_for_vip : Private {
...
my $price = $c->cfg->{vip}{price};
}
As I understand it, this is NOT the way config is intended to work. All
the config for your component (controller in this case) is passed to the
constructor at setup time; all you need to do is make accessors for
whatever you want access to:
__PACKAGE__->mk_accessors(qw/vip/);
sub pay_for_vip : Private {
...
my $price = $self->vip->{price};
}
--
Jason Gottshall
[email protected]
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/