Config-Model
view release on metacpan or search on metacpan
* Config-Model
:PROPERTIES:
:CUSTOM_ID: config-model
:END:
Configuration schema on steroids.
* What is Config-Model project
:PROPERTIES:
:CUSTOM_ID: what-is-config-model-project
:END:
[[https://metacpan.org/pod/Config::Model][Config::Model]] is:
- a set of configuration editor and validator for several projects like
[[http://www.openssh.com/][OpenSSH]], [[https://freedesktop.org/wiki/Software/systemd/][Systemd]], [[http://www.lcdproc.org/][LcdProc]]... See [[https://github.com/dod38fr/config-model/wiki/Available-models-and-backends#Available_models_and_configu...
- a framework that enables a project developer (or any advance user) to
provide a configuration editor and validator to his users.
To generate a configuration editor and validator for a project,
[[https://metacpan.org/pod/Config::Model][Config::Model]] needs:
- a description of the structure and constraints of a project
configuration. (this is called a model, but could also be called a
schema)
- a way to read and write configuration data. This can be provided by
[[https://github.com/dod38fr/config-model/wiki/Available-models-and-backends#Available_backend][built-in read/write backends]] or by a [[http://search.cpan.org/dist/Config-Model/lib/Config/Model/Backend/Any.pm#How_to_write_your_own_backend][new rea...
With the elements above, [[https://metacpan.org/pod/Config::Model][Config::Model]] generates
interactive configuration editors (with integrated help and data
validation) and support several kinds of user interface, e.g. graphical,
interactive command line. See the [[https://github.com/dod38fr/config-model/wiki/Available-models-and-backends#Available_user_interfaces][list of available user interfaces]]
** Installation
:PROPERTIES:
:CUSTOM_ID: installation
:END:
See [[https://github.com/dod38fr/config-model/blob/master/README.install.pod][installation instructions]]. Perl developers can also [[file:build-from-git.md][build Config::Model from git]]
** Getting started
:PROPERTIES:
:CUSTOM_ID: getting-started
:END:
- To manage your configuration files with existing modules, see
[[https://github.com/dod38fr/config-model/wiki/Using-cme][Using cme wiki page]]
- To create configuration tools for your favorite project, see this
[[https://metacpan.org/pod/Config::Model::Manual::ModelCreationIntroduction][introduction to model creation]]
** How does this work ?
:PROPERTIES:
:CUSTOM_ID: how-does-this-work
:END:
Using this project, a typical configuration editor will be made of 3
parts :
1. The user interface ([[http://search.cpan.org/dist/Config-Model/script/cme][cme]] program and some other optional modules)
2. The validation engine which is in charge of validating all the
configuration information provided by the user. This engine is made
of the framework provided by this module and the configuration
description (often referred as "configuration model", this could also
be known as a schema).
3. The storage facility that store the configuration information
(currently several backends are provided: ini files, perl files)
The important part is the configuration model used by the validation
engine. This model can be created or modified with a graphical editor
([[http://search.cpan.org/dist/Config-Model-Itself/lib/App/Cme/Command/meta.pm][cme meta edit]] provided by [[https://metacpan.org/pod/Config::Model::Itself][Config::Model::Itself]]).
** Don't we already have some configuration validation tools ?
:PROPERTIES:
:CUSTOM_ID: dont-we-already-have-some-configuration-validation-tools
:END:
You're probably thinking of tools like webmin. Yes, these tools exist
and work fine, but they have their set of drawbacks.
Usually, the validation of configuration data is done with a script
( run in 0.663 second using v1.01-cache-2.11-cpan-e1769b4cff6 )