[Catalyst] TTSite redefines TT Catalyst Stash Var = C::P::Prototype
Benjamin R. Ginter
bginter at ndevtech.net
Tue Jan 3 12:23:01 CET 2006
After not using Catalyst for a while, I picked it back up this evening but
in Catalyst::Plugin::Prototype to actually define them.
yep, that's what I have in my template.. I racked my brain, searched the
archives, searched the wiki, read and reread the docs..wtf. :)
Finally, I dedid [% USE Dumper %] [% Dumper.dump_html( c ) %] in my
message.tt2 and realized it was undefined. Aha!
I had used myapp_create.pl view TT TTSite and that redefines the template
toolkit 'c' catalyst stash variable as 'Catalyst'. Maybe it shouldn't do
this or I should have read that documentation better.
The simplest solution is to comment out the CATALYST_VAR key in
# CATALYST_VAR => 'Catalyst',
INCLUDE_PATH => [ "$root/src", "$root/lib" ],
PRE_PROCESS => 'config/main',
WRAPPER => 'site/wrapper',
ERROR => 'error.tt2',
TIMER => 1
Hope this saves someone else some time..
On Wed, 21 Dec 2005, John Wang wrote:
> On 12/21/05, raptor <raptor at tvskat.net> wrote:
>> I'm tring this example :
>> but no success..
> There were two typos however I'm not sure they affected you since you
> weren't getting any JS. One was in the page.tt template and the other was in
> the controller. The wiki has been fixed and I have it running with those
> I didn see any Js-code in the genrated displayForm page ?
>> What have to be installed for AJAX to work ?
> If there's no JS code, you probably need HTML::Prototype and
> Catalyst::Plugin::Prototype. In the page.tt template, [%
> TT won't report an error if it can't find c.prototype. In your app you need:
> use Catalyst qw/Prototype/;
> I should probably get rid of the separate Controller in the example....
More information about the Catalyst