wrapper.tt
[% IF no_wrapper;
content;
ELSE;
wrapper = wrapper || 'full.tt';
content WRAPPER $wrapper;
END;
-%]
####
full.tt
..............
..............
include some Asian characters
.............
.............
##
Myapp.pm
package Myapp;
use Moose;
use namespace::autoclean;
use Catalyst::Runtime 5.80;
# Set flags and add plugins for the application
#
# -Debug: activates the debug mode for very useful log messages
# ConfigLoader: will load the configuration from a Config::General file in the
# application's home directory
# Static::Simple: will serve static files from the application's root
# directory
use Catalyst qw/
-Debug
ConfigLoader
Static::Simple
StackTrace
Unicode
/;
##
some controller code:
sub purchase_manage : Local {
my ( $self, $c ) = @_;
$c->stash(no_wrapper => 0);
$c->stash(merchants => [$c->model('WindyDB::Merchant')->all]); # There are some Asian characters stored in DB.
$c->stash(persons => [$c->model('WindyDB::person')->all]); # ditto
$c->stash(no_wrapper => 0);
$c->stash(template => 'purchase_manage.tt');
####
package UW::Model::WindyDB;
use lib '/opt/oracle/product/11.2.0/dbhome_1/perl/lib/site_perl/5.10.0/i686-linux-thread-multi/';
use strict;
use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__->config(
schema_class => 'UW::Schema',
connect_info => {
dsn => 'dbi:Oracle:oraUW',
user => 'UW',
password => 'windy123',
{oracharset => 'AL32UTF8'}
}
);