root/Catalyst-View-Jemplate/trunk/t/lib/TestApp.pm

Revision 2111 (checked in by miyagawa, 14 years ago)

patch from dmaki

  • Property svn:keywords set to Id Revision
Line 
1 package TestApp;
2
3 use strict;
4 use warnings;
5
6 use Catalyst;
7
8 our $VERSION = '0.01';
9 __PACKAGE__->config({
10     name => 'TestApp',
11     'View::Jemplate' => {
12         jemplate_dir => TestApp->path_to('root'),
13     },
14 });
15
16 __PACKAGE__->setup;
17
18 sub jemplate : Global {
19     my ( $self, $c ) = @_;
20     $c->forward('View::Jemplate');
21 }
22
23 sub finalize_error {
24     my $c = shift;
25     $c->res->header('X-Error' => $c->error->[0]);
26     $c->NEXT::finalize_error;
27 }
28
29 sub selected : Global {
30     my ( $self, $c ) = @_;
31
32     $c->stash->{jemplate} = {
33         files => 'bar.tt'
34     };
35     $c->forward('View::Jemplate');
36 }
37
38 1;
Note: See TracBrowser for help on using the browser.