Debian Codegraph @

examples/README

raw
1 Examples for Config::Merge
2 ===========================
3
4 There are four examples of the usage of Config::Merge:
5
6 1) 'oo.pl' and 'func.pl' illustrate the two ways of using Config::Merge
7 They dump the config data corresponding to the path you type in.
8
9 To run them, try this:
10
11 perl oo.pl
12 perl oo.pl app.images
13 perl oo.pl app.html_filter.BanAllBut
14 perl oo.pl app.html_filter.BanAllBut.2
15
16 OR
17
18 perl func.pl
19 perl func.pl app.images
20 perl func.pl app.html_filter.BanAllBut
21 perl func.pl app.html_filter.BanAllBut.2
22
23 You need to have YAML::Syck or YAML installed to use these examples
24
25 2) 'browser.pl' allows you to compare the data between a production environment
26 and a development environment. The only difference between the data is
27 the 'local.yaml' file in 'config_dev/local.yaml'
28
29 To try it, type:
30 perl browser.pl
31 OR perl browser.pl debug
32
33 Then enter the path to the data you want (eg 'app.images.path')
34 or you can just press Enter to start.
35
36 You need to have Term::ReadLine and YAML::Syck or YAML installed to use
37 this example
38
39
40 3) 'advanced.pl' illustrates how to define your own methods for is_local()
41 and load_as(). It shows the same config data for the production server
42 and for the machines 'dev1' and 'dev2'
43
44 perl advanced.pl
45 OR perl advanced.pl debug
46