[Catalyst] In search of a clue ... how do I access
_PACKAGE_->config values , or more specifically,
values put into myapp.yml ?
John Goulah
jgoulah at gmail.com
Mon Nov 5 21:17:17 GMT 2007
On Nov 5, 2007 12:37 PM, Joe Landman <landman at scalableinformatics.com>
wrote:
> Hi folks:
>
> This should be an easy one. I read and read and read. The manual is
> fine, but my reading skills may be in doubt.
>
> This is what I want to do. I want to set a simple variable named
> myvar in myapp.yml. Then I want to pick it up later on.
>
> So far so good, I have
>
> myvar: blahblahblah
>
> in myapp.yml at the top of my application tree (in the same directory as
> lib, script, root, ...)
>
> Now, in one of my controllers, I want to get access myvar. I thought I
> can get at it like this:
>
> $c->config->{myvar}
> <http://dev.catalyst.perl.org/>
Looks right, did you load the ConfigLoader plugin (
http://search.cpan.org/~bricas/Catalyst-Plugin-ConfigLoader-0.18/lib/Cataly=
st/Plugin/ConfigLoader.pm)
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071105/7f082=
010/attachment.htm
More information about the Catalyst
mailing list