Template Toolkitを使用する方法が本のとおりだと動作しない。ちなみに Catalyst 5.7002です。
以下の方法で動作した。バージョンの違い?
方法
- myapp.ymlはなにも記述しないでそのままにする。
- 「use Time::Piece;」をMyApp/Contoroller/Root.pmに追記
- $c->stash->{template} = 'hello.tt';を$c->forward($c->view('TT'));の前に追記
- hello.ttはrootの下に置く。
Class::DBIを利用する部分
MyApp::Model::CDBI::(テーブル名の大文字)->retrieve_all;