/usr/share/perl5/Config/Model/models/Itself/WarpValue.pl is in libconfig-model-itself-perl 2.006-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #
# This file is part of Config-Model-Itself
#
# This software is Copyright (c) 2007-2016 by Dominique Dumont.
#
# This is free software, licensed under:
#
# The GNU Lesser General Public License, Version 2.1, February 1999
#
[
[
name => "Itself::WarpValue",
class_description => 'Warp functionality enable a Value object to change its properties (i.e. default value or its type) dynamically according to the value of another Value object locate elsewhere in the configuration tree.',
'element'
=> [
'follow'
=> {
type => 'hash',
index_type =>'string',
cargo => { type => 'leaf', value_type => 'uniline' } ,
description => 'Specify with a path the configuration element that will drive the warp , i.e .the elements that control the property change. These a specified using a variable name (used in the "rules" formula) and a path to fetch the actual value. Example $country => " ! country"',
},
'rules' => {
type => 'hash',
ordered => 1,
index_type => 'string',
cargo => {
type => 'warped_node',
warp => {
rules => [
'&get_type =~ /hash|list/' => {
config_class_name => 'Itself::WarpableCargoElement'
},
'&get_type !~ /hash|list/' => {
config_class_name => 'Itself::WarpOnlyElement' ,
}
]
}
},
description => 'Each key of the hash is a test (as formula using the variables defined in "follow" element) that are tried in sequences to apply its associated effects',
},
],
],
];
|