| 1 | package # hide from PAUSE | ||
| 2 | Hopkins::Plugin::HMI::Catalyst::View::TT; | ||
| 3 | 2 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | $Hopkins::Plugin::HMI::Catalyst::View::TT::VERSION = '0.900'; | |
| 5 | } | ||
| 6 | |||
| 7 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | Hopkins::Plugin::HMI::Catalyst::View::TT - Catalyst TT View | ||
| 13 | |||
| 14 | =cut | ||
| 15 | |||
| 16 | 2 | ▶ | use base 'Catalyst::View::TT'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 0 | ▶ | use JSON; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 19 | |||
| 20 | __PACKAGE__->config({ | ||
| 21 | PRE_PROCESS => 'bootstrap.tt', | ||
| 22 | WRAPPER => 'wrapper.tt', | ||
| 23 | TEMPLATE_EXTENSION => '.tt', | ||
| 24 | TIMER => 0, | ||
| 25 | static_root => '/static', | ||
| 26 | static_build => 0 | ||
| 27 | }); | ||
| 28 | |||
| 29 | $Template::Stash::SCALAR_OPS->{printf} = sub { sprintf $_[1], $_[0] }; | ||
| 30 | |||
| 31 | $Template::Stash::LIST_OPS->{to_json} = sub { return to_json(shift, { allow_barekey => 1, allow_singlequote => 1} ) }; | ||
| 32 | |||
| 33 | =head1 AUTHOR | ||
| 34 | |||
| 35 | Mike Eldridge <diz@cpan.org> | ||
| 36 | |||
| 37 | =head1 LICENSE | ||
| 38 | |||
| 39 | This program is free software; you may redistribute it | ||
| 40 | and/or modify it under the same terms as Perl itself. | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | 1; | ||