1Config::Generator::TempUlsaetre(C3o)ntributed Perl DocumCeonntfaitgi:o:nGenerator::Template(3)
2
3
4

NAME

6       Config::Generator::Template - Config::Generator template support
7

DESCRIPTION

9       This module eases configuration file generation by providing template
10       support.  A template is a file with markup. Given a high-level
11       configuration, the template can be processed and transformed into a
12       low-level configuration file.
13

SYNTAX

15       The template commands are enclosed within "<{" and "}>". If PATH
16       represents a path in the high-level configuration:
17
18       •   "<{PATH}>" will be replaced by the value of PATH
19
20       •   "<{open()}>" will be replaced by "<{"
21
22       •   "<{close()}>" will be replaced by "}>"
23
24       •   "<{if(PATH)}>xxx<{endif(PATH)}>" will be replaced by "xxx" if PATH
25           is true or "" otherwise (this is done using Perl's conditional
26           testing)
27
28       •   "<{ifnot(PATH)}>xxx<{endif(PATH)}>" is the same as "if()" but
29           negated
30
31       •   "<{if_true(PATH)}>xxx<{endif(PATH)}>" is the same as "if()" but
32           tested using Config::Validator's is_true()
33
34       •   "<{if_false(PATH)}>xxx<{endif(PATH)}>" is the same as "if()" but
35           tested using Config::Validator's is_false()
36
37       •   "<{ifdef(PATH)}>xxx<{endif(PATH)}>" will be replaced by "xxx" if
38           PATH is defined (i.e. set) or "" otherwise
39
40       •   "<{ifndef(PATH)}>xxx<{endif(PATH)}>" is the same as "ifdef()" but
41           negated
42

FUNCTIONS

44       This module provides the following functions (none of them being
45       exported by default):
46
47       declare_template(NAME...)
48           declare one or more template names so that they can be customized
49           using the "/Template" schema
50
51       expand_template(NAME[, HASH])
52           read and process the named template, using the given hash as well
53           as the high-level configuration
54
55       process_template(TEMPLATE, HASH...)
56           process the given template string using the given hashes
57
58       read_template(NAME)
59           return the contents of the named template (unprocessed)
60

AUTHOR

62       Lionel Cons <http://cern.ch/lionel.cons>
63
64       Copyright (C) CERN 2013-2016
65
66
67
68perl v5.34.0                      2021-10-18    Config::Generator::Template(3)
Impressum