1MooX::ConfigFromFile::RUosleer::CHoansthrMiMeboruogtXee:Ld:oCaPodenerfdli(g3DF)orcoummFeinltea:t:iRoonle::HashMergeLoaded(3)
2
3
4

NAME

6       MooX::ConfigFromFile::Role::HashMergeLoaded - allows better merge
7       strategies for multiple config files
8

SYNOPSIS

10         package MyApp::Cmd::TPau;
11
12         use DBI;
13         use Moo;
14         use MooX::Cmd with_configfromfile => 1;
15
16         with "MooX::ConfigFromFile::Role::HashMergeLoaded";
17
18         has csv => (is => "ro", required => 1);
19
20         sub execute
21         {
22             my $self = shift;
23             DBI->connect("DBI::csv:", undef, undef, $self->csv);
24         }
25
26         __END__
27         $ cat etc/myapp.json
28         {
29           "csv": {
30             "f_ext": ".csv/r",
31             "csv_sep_char": ";",
32             "csv_class": "Text::CSV_XS"
33           }
34         }
35         $cat etc/myapp-tpau.json
36         {
37           "csv": {
38             "f_dir": "data/tpau"
39           }
40         }
41

DESCRIPTION

43       This is an additional role for MooX::ConfigFromFile to allow better
44       merging of deep structures.
45

ATTRIBUTES

47   config_merge_behavior
48       This attribute contains the behavior which will config_merger use to
49       merge particular loaded configurations.
50
51   config_merger
52       This attribute contains the instance of Hash::Merge used to merge the
53       raw_loaded_config into loaded_config.
54
55   loaded_config
56       This role modifies the builder for loaded_config by merging the items
57       from raw_loaded_config in order of appearance. It is assumed that more
58       relevant config files are in front and are filled up with defaults in
59       following ones.
60

AUTHOR

62       Jens Rehsack, "<rehsack at cpan.org>"
63

ACKNOWLEDGEMENTS

66       Copyright 2015-2018 Jens Rehsack.
67
68       This program is free software; you can redistribute it and/or modify it
69       under the terms of either: the GNU General Public License as published
70       by the Free Software Foundation; or the Artistic License.
71
72       See <http://dev.perl.org/licenses/> for more information.
73
74
75
76perl v5.36.0                    Mo2o0X2:3:-C0o1n-f2i0gFromFile::Role::HashMergeLoaded(3)
Impressum