[Catalyst] HOWTO reference config settings from template
Peter Karman
peter at peknet.com
Thu Apr 12 16:51:04 GMT 2007
Jeff Chimene scribbled on 4/12/07 10:35 AM:
> and I don't see the TT2 configuration settings. When I try the similar
> experiment in the perl module, & dump __PACKAGE__->config, the TT2
> configuration settings are displayed.
>
that's because your TT config probably isn't getting set in the master config
for your app, which is what c.config returns.
Every M/V/C in Catalyst has a config() method (iirc -- please correct me, oh
gurus), and the master MyApp class has a config() too, which is where you
generally set values for the entire application.
You can set your TT config there too. But looking at what you're trying to do, I
wonder if what you really want is a TT type config file, which can set constants
and other relevant TT stuff. CatRose has an example of how I do it:
http://search.cpan.org/src/KARMAN/Catalyst-Controller-Rose-0.01/examples/CatRose/lib/CatRose/View/TT.pm
cheers.
pek
--
Peter Karman . http://peknet.com/ . peter at peknet.com
More information about the Catalyst
mailing list