1Config::Model::Itself::UBsaecrkeCnodnDtertiebcuttoerdC(o3Pn)efrilg:D:oMcoudmeeln:t:aIttisoenlf::BackendDetector(3)
2
3
4

NAME

6       Config::Model::Itself::BackendDetector - Detect available read/write
7       backends usable by config models
8

VERSION

10       version 2.014
11

SYNOPSIS

13        # this class should be referenced in a configuration model and
14        # created only by Config::Model::Node
15
16        my $model = Config::Model->new() ;
17
18        $model ->create_config_class
19         (
20          name => "Test",
21          'element'
22          => [
23              'backend' => { type => 'leaf',
24                             class => 'Config::Model::Itself::BackendDetector' ,
25                             value_type => 'enum',
26                             # specify backends built in Config::Model
27                             choice => [qw/cds_file perl_file ini_file custom/],
28
29                             help => {
30                                      cds_file => "file ...",
31                                      ini_file => "Ini file ...",
32                                      perl_file => "file  perl",
33                                      custom => "Custom format",
34                                     }
35                           }
36             ],
37         );
38
39         my $root = $model->instance(root_class_name => 'Test') -> config_root ;
40
41         my $backend = $root->fetch_element('backend') ;
42
43         my @choices = $backend->get_choice ;
44

DESCRIPTION

46       This class is derived from Config::Model::Value. It is designed to be
47       used in a 'enum' value where the choice (the available backends) are
48       the backend built in Config::Model and all the plugin backends. The
49       plugin backends are all the "Config::Model::Backend::*" classes.
50
51       This module will detect available plugin backend and query their pod
52       documentation to provide a contextual help for config-model graphical
53       editor.
54

SEE ALSO

56       Config::Model, Config::Model::Node, Config::Model::Value
57

AUTHOR

59       Dominique Dumont
60
62       This software is Copyright (c) 2007-2018 by Dominique Dumont.
63
64       This is free software, licensed under:
65
66         The GNU Lesser General Public License, Version 2.1, February 1999
67
68
69
70perl v5.28.0                      2018C-o0n8f-i0g7::Model::Itself::BackendDetector(3)
Impressum