Mercurial > pub > Impl
comparison _test/temp.pl @ 406:f23fcb19d3c1 ref20150831
implemented ServicesBag
author | cin |
---|---|
date | Mon, 31 Aug 2015 20:22:16 +0300 |
parents | 38cb0b80e88e |
children | c6e90e02dd17 |
comparison
equal
deleted
inserted
replaced
405:cd6c6e61d442 | 406:f23fcb19d3c1 |
---|---|
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 use strict; | 2 use strict; |
3 | 3 |
4 my $p = 'sometype'; | 4 use YAML::XS; |
5 my $c = 'My::App::aSomeType'; | 5 $YAML::XS::DumpCode = 1; |
6 | 6 |
7 my $suffix = substr($c, -length($p)); | 7 my $conf = { |
8 my $prefix = substr($c, 0, -length($p)); | 8 '@include' => [qw(security view)], |
9 print join ("\n",$suffix,$prefix,$p,$c), "\n"; | 9 runtime => { |
10 type => 'IMPL::Web::Application', | |
11 params => { | |
12 handlers => {depdendency => 'filters'} | |
13 } | |
14 }, | |
15 filters => [ | |
16 { type => 'IMPL::Web::CookieAuth' }, | |
17 { type => 'IMPL::Web::Security' }, | |
18 { type => 'IMPL::Web::LocaleHandler', | |
19 params => { | |
20 locales => [ | |
21 'en-US', | |
22 'ru-RU' | |
23 ], | |
24 default => 'en-US' | |
25 } | |
26 }, | |
27 { type => 'IMPL::Web::ContentNegotiation' }, | |
28 { type => 'IMPL::Web::RestController' } | |
29 ], | |
30 custom => { | |
31 factory => sub { return "hi!" } | |
32 } | |
33 }; | |
10 | 34 |
11 print $prefix && not(substr($prefix,-2) eq '::') ? 'corrupted' : 'class' ; | 35 print Dump($conf); |
36 | |
37 1; |