1Config::Model::SimpleUIU(s3e)r Contributed Perl DocumentaCtoinofnig::Model::SimpleUI(3)
2
3
4
6 Config::Model::SimpleUI - Simple interface for Config::Model
7
9 version 1.205
10
12 my $model = Config::Model -> new ;
13 my $inst = $model->instance (root_class_name => 'RootClass',
14 instance_name => 'my_instance');
15 my $root = $inst -> config_root ;
16
17 my $ui = Config::Model::SimpleUI->new( root => $root ,
18 title => 'My Title',
19 prompt => 'My Prompt',
20 );
21
22 # engage in user interaction
23 $ui -> run_loop ;
24
26 This module provides a pure ascii user interface using STDIN and
27 STDOUT.
28
30 cd ...
31 Jump into node or value element. You can use "cd <element>", "cd
32 <elt:key>" or "cd -" to go up one node or "cd !" to go to
33 configuration root.
34
35 set elt=value
36 Set a leaf value.
37
38 set elt:key=value
39 Set a leaf value locate in a hash or list element.
40
41 display node_name elt:key
42 Display a value
43
44 ls Show elements of current node
45
46 help
47 Show available commands.
48
49 desc[ription]
50 Show class description of current node.
51
52 desc(elt)
53 Show description of element from current node.
54
55 desc(value)
56 Show effect of value (for enum)
57
59 parameters
60 root
61 Root node of the configuration tree
62
63 title
64 UI title
65
66 prompt
67 UI prompt. The prompt will be completed with the location of the
68 current node.
69
71 run_loop()
72 Engage in user interaction until user enters '^D' (CTRL-D).
73
75 ยท UI should take into account experience.
76
78 Dominique Dumont, (ddumont at cpan dot org)
79
81 Config::Model, Config::Model::Instance, Config::Model::Node,
82
83
84
85perl v5.12.1 2010-08-18 Config::Model::SimpleUI(3)