Config::Model::SimpleUI - Simple interface for Config::Model
my $model = Config::Model -> new ; my $inst = $model->instance (root_class_name => 'RootClass', instance_name => 'my_instance'); my $root = $inst -> config_root ; my $ui = Config::Model::SimpleUI->new( root => $root , title => 'My Title', prompt => 'My Prompt', ); # engage in user interaction $ui -> run_loop ;
This module provides a pure ascii user interface using STDIN and STDOUT.
Jump into node or value element. You can use cd <element>, cd <elt:key> or cd - to go up one node or cd ! to go to configuration root.
cd <element>
cd <elt:key>
cd -
cd !
Set a leaf value.
Set a leaf value locate in a hash or list element.
Display a value
Show elements of current node
Show available commands.
Show class description of current node.
Show description of element from current node.
Show effect of value (for enum)
Root node of the configuration tree
UI title
UI prompt. The prompt will be completed with the location of the current node.
Engage in user interaction until user enters '^D' (CTRL-D).
UI should take into account experience.
Dominique Dumont, (ddumont at cpan dot org)
Config::Model, Config::Model::Instance, Config::Model::Node,
To install Config::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Model
CPAN shell
perl -MCPAN -e shell install Config::Model
For more information on module installation, please visit the detailed CPAN module installation guide.