blib/lib/Config/Model/models/Itself/Application.pl

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/App/Cme/Command/meta.pm ↑ Summary blib/lib/Config/Model/models/Itself/CargoElement.pl »
1 1 ▶#
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶# This file is part of Config-Model-Itself
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶#
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶# This software is Copyright (c) 2007-2026 by Dominique Dumont.
Subroutine BEGIN: called CC=1 SCAR=0.0
5 #
6 # This is free software, licensed under:
7 #
8 # The GNU Lesser General Public License, Version 2.1, February 1999
9 #
10 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 return [
14 {
15 5 name => 'Itself::Application',
16 # read/written by Config::Model::Itself (read_all)
17  
18 element => [
19 model => {
20 refer_to => '! class',
21 type => 'leaf',
22 value_type => 'reference',
23 description => 'Top class required to configure this application',
24 },
25 synopsis => {
26 type => 'leaf',
27 value_type => 'uniline',
28 description => "one line description of the application."
29 },
30 link_to_doc => {
31 type => 'leaf',
32 value_type => 'uniline',
33 description => "Documentation URL."
34 },
35 category => {
36 choice => [
37 'system',
38 'user',
39 'application'
40 ],
41 type => 'leaf',
42 value_type => 'enum',
43 mandatory => 1,
44 description => 'Can be "system", "user" or "application"',
45 help => {
46 system => 'Configuration file is owned by root and usually located in C</etc>',
47 user => 'Configuration files is owned by user and usually located in C<~/.*>',
48 application => 'Configuration file is located anywhere and is usually explicitly '
49 .'specified to application. E.g. C<multistrap -f CONFIG_FILE>',
50 }
51 },
52 allow_config_file_override => {
53 type => 'leaf',
54 upstream_default => '0',
55 value_type => 'boolean',
56 description => 'Set if user can override the configuration file loaded by default by cme',
57 },
58 require_config_file => {
59 type => 'leaf',
60 upstream_default => '0',
61 value_type => 'boolean',
62 description => "set when there's no default path for the configuration file."
63 . "user will have to specify a configuration file with C<--file> option."
64 },
65 require_backend_argument => {
66 type => 'leaf',
67 upstream_default => '0',
68 value_type => 'boolean',
69 description => "set when the application backend requires an argument passed "
70 . "as 3rd argument to cme, e.g. cme <cmd> <app> <backend_arg>."
71 },
72 use_backend_argument_as_config_file => {
73 type => 'leaf',
74 upstream_default => '0',
75 value_type => 'boolean',
76 description => "When backend argument is also used as the name of the config file."
77 },
78 backend_argument_info => {
79 type => 'leaf',
80 value_type => 'uniline',
81 description => "Short description of the backend argument. Used to generate error "
82 ."message when user forgets to set the 3rd cme argument."
83 },
84 config_dir => {
85 type => 'leaf',
86 value_type => 'uniline',
87 description => "set configuration directory where config file is read from "
88 . "or written to. This value does not override a directory specified in the model."
89 },
90 support_info => {
91 type => 'leaf',
92 value_type => 'uniline',
93 description => "Instructions to let user report a bug for this application. This URL is shown in "
94 . 'the message of unknown element exception in the string "please submit a bug report '
95 . '$support_info". Defaults to an url to Config::Model bug tracker',
96 upstream_default => 'to https://github.com/dod38fr/config-model/issues',
97 }
98 ],
99 }
100 ] ;
101  
« blib/lib/App/Cme/Command/meta.pm ↑ Summary blib/lib/Config/Model/models/Itself/CargoElement.pl »