Curses interface to edit config data
use Config::Model ; use Config::Model::CursesUI ; my $model = Config::Model -> new ; my $inst = $model->instance (root_class_name => 'XXX', instance_name => 'yyy'); # create dialog my $dialog = Config::Model::CursesUI-> new ( experience => 'beginner', # or 'advanced' ) ; # start never returns $dialog->start($model) ;
This class provides a Curses::UI interface to configuration data managed by Config::Model.
\s-1IMPORTANT:\s0 Once the CursesUI object is created, \s-1STDOUT\s0 and \s-1STDERR\s0 are managed by the Curses interface, so all print and warn will not work as expected.
The constructor accepts the following parameters:
Specifies the experience level of the user (default: \*(C`beginner\*(C'). The experience can be \*(C`master advanced beginner\*(C'.
Subroutine ref containing the code to load the configuration data from the configuration files. This may overrides loading mechanism specified in the model with Config::Model::AutoRead. This sub is called without any arguments.
Subroutine ref containing the code to store the configuration data in the configuration files. This may overrides writing mechanism specified in the model with Config::Model::AutoRead. This sub is called without any arguments.
Dominique Dumont, (ddumont at cpan dot org)
Copyright (c) 2007-2009,2011 Dominique Dumont.
This file is part of Config-Model.
Config-Model is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
Config-Model is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more details.
You should have received a copy of the GNU Lesser Public License along with Config-Model; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Config::Model, Config::Model::ObjTreeScanner, Curses::UI, Curses