Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 47 lines (43 sloc) 1.118 kb
1da526d @nekokak validatorの実装
authored
1 use Kamui;
296a8e7 @nekokak PlackベースのWeb部分とりあえず完成
authored
2 use MyAPP::Container;
3 use Path::Class;
a3934ae @nekokak filterの定義をconfから
authored
4 use HTML::Entities;
5 use Encode;
6 use URI::Escape;
296a8e7 @nekokak PlackベースのWeb部分とりあえず完成
authored
7
8 my $home = container('home');
9
10 return +{
1a4359e @nekokak add View::JSON
authored
11 view => {
12 tt => +{
13 path => $home->file('assets/tmpl')->stringify,
14 options => '',
a3934ae @nekokak filterの定義をconfから
authored
15 filters => +{
16 html_unescape => sub {
17 HTML::Entities::decode_entities(shift);
18 },
19 uri => sub{
20 Encode::is_utf8( $_[0] )
21 ? URI::Escape::uri_escape_utf8($_[0])
22 : URI::Escape::uri_escape($_[0]);
23 },
71c6e32 @nekokak add Plugin::Encode and finished Plugin::Mobile::Encode and etc...
authored
24 sjis => sub {
25 Encode::encode('sjis', $_[0])
26 },
a3934ae @nekokak filterの定義をconfから
authored
27 },
1a4359e @nekokak add View::JSON
authored
28 },
29 json => +{
30 stash_key => 'json',
31 callback_param => 'callback',
32 },
296a8e7 @nekokak PlackベースのWeb部分とりあえず完成
authored
33 },
1da526d @nekokak validatorの実装
authored
34 validator_message => +{
35 param => +{
36 age => '年齢',
37 },
38 function => +{
39 not_null => '[_1]が空です',
40 },
41 message => +{
42 'foo.bar' => 'fooがbarですね',
43 },
44 },
296a8e7 @nekokak PlackベースのWeb部分とりあえず完成
authored
45 };
a3934ae @nekokak filterの定義をconfから
authored
46
Something went wrong with that request. Please try again.