Commit | Line | Data |
affbca23 |
1 | =head1 NAME |
2 | |
3 | Catalyst::Plugin::ConfigLoader::Manual - Guide to using the ConfigLoader plugin |
4 | |
5 | =head1 BASIC USAGE |
6 | |
7 | package MyApp; |
8 | |
9 | use Catalyst qw( ConfigLoader ... ); |
10 | |
11 | =head1 CONFIG FORMATS |
12 | |
13 | =head2 Config::General |
14 | |
15 | name = TestApp |
16 | <Component Controller::Foo> |
17 | foo bar |
18 | </Component> |
19 | <Model Baz> |
20 | qux xyzzy |
21 | </Model> |
22 | |
23 | =head2 INI |
24 | |
25 | name=TestApp |
26 | |
27 | [Controller::Foo] |
28 | foo=bar |
29 | |
30 | [Model::Baz] |
31 | qux=xyzzy |
32 | |
33 | =head2 JSON |
34 | |
35 | { |
36 | "name": "TestApp", |
37 | "Controller::Foo": { |
38 | "foo": "bar" |
39 | }, |
40 | "Model::Baz": { |
41 | "qux": "xyzzy" |
42 | } |
43 | } |
44 | |
45 | =head2 Perl |
46 | |
47 | { |
48 | name => 'TestApp', |
49 | 'Controller::Foo' => { |
50 | foo => 'bar' |
51 | }, |
52 | 'Model::Baz' => { |
53 | qux => 'xyzzy' |
54 | } |
55 | } |
56 | |
57 | =head2 XML |
58 | |
59 | <config> |
60 | <name>TestApp</name> |
61 | <component name="Controller::Foo"> |
62 | <foo>bar</foo> |
63 | </component> |
64 | <model name="Baz"> |
65 | <qux>xyzzy</qux> |
66 | </model> |
67 | </config> |
68 | |
69 | =head2 YAML |
70 | |
71 | --- |
72 | name: TestApp |
73 | Controller::Foo: |
74 | foo: bar |
75 | Model::Baz: |
76 | qux: xyzzy |
77 | |
78 | =cut |