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

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 26 / 26 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Config/Model/models/Itself/Application.pl ↑ Summary blib/lib/Config/Model/models/Itself/Class.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 #
4 # This software is Copyright (c) 2007-2026 by Dominique Dumont.
5 #
6 # This is free software, licensed under:
7 #
8 # The GNU Lesser General Public License, Version 2.1, February 1999
9 #
10 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
11 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 return [
14 [
15 5 name => "Itself::CargoElement",
16  
17 include =>
18 [ 'Itself::NonWarpableElement', 'Itself::WarpableElement' ],
19 include_after => 'type',
20  
21 gist => '{type}',
22  
23 'element' => [
24  
25 # structural information
26 'type' => {
27 type => 'leaf',
28 value_type => 'enum',
29 choice => [qw/node warped_node leaf check_list/],
30 mandatory => 1,
31 description => 'specify the type of the cargo.',
32 },
33  
34 # node element (may be within a hash or list)
35  
36 'warp' => {
37 type => 'warped_node',
38 level => 'hidden',
39  
40 warp => {
41 follow => { elt_type => '- type' },
42 rules => [
43 '$elt_type ne "node"' => {
44 level => 'normal',
45 config_class_name => 'Itself::WarpValue',
46 }
47 ],
48 },
49 description =>
50 "change the properties (i.e. default value or its value_type) "
51 . "dynamically according to the value of another Value object located "
52 . "elsewhere in the configuration tree. "
53  
54 },
55  
56 ],
57  
58 ],
59  
60 ];
« blib/lib/Config/Model/models/Itself/Application.pl ↑ Summary blib/lib/Config/Model/models/Itself/Class.pl »