1Config::Model::CursesUIU(s3e)r Contributed Perl DocumentaCtoinofnig::Model::CursesUI(3)
2
3
4
6 Config::Model::CursesUI - Curses interface to edit config data
7
9 use Config::Model ;
10 use Config::Model::CursesUI ;
11
12 my $model = Config::Model -> new ;
13
14 my $inst = $model->instance (root_class_name => 'XXX',
15 instance_name => 'yyy');
16
17 # create dialog
18 my $dialog = Config::Model::CursesUI-> new
19 (
20 experience => 'beginner', # or 'advanced'
21 ) ;
22
23 # start never returns
24 $dialog->start($model) ;
25
27 This class provides a Curses::UI interface to configuration data
28 managed by Config::Model.
29
30 IMPORTANT: Once the CursesUI object is created, STDOUT and STDERR are
31 managed by the Curses interface, so all print and warn will not work as
32 expected.
33
35 The constructor accepts the following parameters:
36
37 experience
38 Specifies the experience level of the user (default: "beginner").
39 The experience can be "master advanced beginner".
40
41 load
42 Subroutine ref containing the code to load the configuration data
43 from the configuration files. This may overrides loading mechanism
44 specified in the model with Config::Model::AutoRead. This sub is
45 called without any arguments.
46
47 store
48 Subroutine ref containing the code to store the configuration data
49 in the configuration files. This may overrides writing mechanism
50 specified in the model with Config::Model::AutoRead. This sub is
51 called without any arguments.
52
54 Dominique Dumont, (ddumont at cpan dot org)
55
57 Copyright (c) 2007-2009 Dominique Dumont.
58
59 This file is part of Config-Model.
60
61 Config-Model is free software; you can redistribute it and/or
62 modify it under the terms of the GNU Lesser Public License as
63 published by the Free Software Foundation; either version 2.1 of
64 the License, or (at your option) any later version.
65
66 Config-Model is distributed in the hope that it will be useful,
67 but WITHOUT ANY WARRANTY; without even the implied warranty of
68 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
69 Lesser Public License for more details.
70
71 You should have received a copy of the GNU Lesser Public License
72 along with Config-Model; if not, write to the Free Software
73 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
74 02110-1301 USA
75
77 Config::Model, Config::Model::ObjTreeScanner, Curses::UI, Curses
78
79
80
81perl v5.12.1 2010-06-27 Config::Model::CursesUI(3)