annotate _test/temp.pl @ 406:f23fcb19d3c1 ref20150831

implemented ServicesBag
author cin
date Mon, 31 Aug 2015 20:22:16 +0300
parents 38cb0b80e88e
children c6e90e02dd17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
1 #!/usr/bin/perl
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
2 use strict;
395
212cc86e470b Code cleanup
sergey
parents: 381
diff changeset
3
406
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
4 use YAML::XS;
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
5 $YAML::XS::DumpCode = 1;
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
6
406
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
7 my $conf = {
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
8 '@include' => [qw(security view)],
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
9 runtime => {
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
10 type => 'IMPL::Web::Application',
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
11 params => {
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
12 handlers => {depdendency => 'filters'}
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
13 }
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
14 },
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
15 filters => [
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
16 { type => 'IMPL::Web::CookieAuth' },
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
17 { type => 'IMPL::Web::Security' },
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
18 { type => 'IMPL::Web::LocaleHandler',
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
19 params => {
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
20 locales => [
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
21 'en-US',
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
22 'ru-RU'
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
23 ],
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
24 default => 'en-US'
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
25 }
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
26 },
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
27 { type => 'IMPL::Web::ContentNegotiation' },
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
28 { type => 'IMPL::Web::RestController' }
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
29 ],
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
30 custom => {
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
31 factory => sub { return "hi!" }
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
32 }
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
33 };
395
212cc86e470b Code cleanup
sergey
parents: 381
diff changeset
34
406
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
35 print Dump($conf);
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
36
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
37 1;