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 | |
bc40ee17 |
11 | =head1 ENVIRONMENT VARIABLES |
12 | |
13 | =over 4 |
14 | |
15 | =item * C<MYAPP_CONFIG> - specific config file to load for "MyApp" |
16 | |
17 | =item * C<CATALYST_CONFIG_LOCAL_SUFFIX> - global suffix for extra config files |
18 | |
19 | =item * C<MYAPP_CONFIG_LOCAL_SUFFIX> - suffix specifically for "MyApp" |
20 | |
21 | =back |
22 | |
affbca23 |
23 | =head1 CONFIG FORMATS |
24 | |
25 | =head2 Config::General |
26 | |
27 | name = TestApp |
28 | <Component Controller::Foo> |
29 | foo bar |
30 | </Component> |
31 | <Model Baz> |
32 | qux xyzzy |
33 | </Model> |
34 | |
35 | =head2 INI |
36 | |
37 | name=TestApp |
38 | |
39 | [Controller::Foo] |
40 | foo=bar |
41 | |
42 | [Model::Baz] |
43 | qux=xyzzy |
44 | |
45 | =head2 JSON |
46 | |
47 | { |
48 | "name": "TestApp", |
49 | "Controller::Foo": { |
50 | "foo": "bar" |
51 | }, |
52 | "Model::Baz": { |
53 | "qux": "xyzzy" |
54 | } |
55 | } |
56 | |
57 | =head2 Perl |
58 | |
59 | { |
60 | name => 'TestApp', |
61 | 'Controller::Foo' => { |
62 | foo => 'bar' |
63 | }, |
64 | 'Model::Baz' => { |
65 | qux => 'xyzzy' |
66 | } |
67 | } |
68 | |
69 | =head2 XML |
70 | |
71 | <config> |
72 | <name>TestApp</name> |
73 | <component name="Controller::Foo"> |
74 | <foo>bar</foo> |
75 | </component> |
76 | <model name="Baz"> |
77 | <qux>xyzzy</qux> |
78 | </model> |
79 | </config> |
80 | |
81 | =head2 YAML |
82 | |
83 | --- |
84 | name: TestApp |
85 | Controller::Foo: |
86 | foo: bar |
87 | Model::Baz: |
88 | qux: xyzzy |
89 | |
90 | =cut |