PERL : Libconf::Glueconf::Generic::KeyValue C/PYTHON/RUBY : Generic/KeyValue
Libconf::Glueconf::Generic::KeyValue is a generic template that handles config files that contain semantic informations of type : (KEY - VALUE).
$autologin = new Libconf::Glueconf::Generic::KeyValue({ filename => 'autologin',
separator_char => '=',
allow_space => 0,
comments_struct => [['#']],
handle_quote => 1,
handle_multiples_lines => 0,
});
$autologin->{USER} = 'foo';
$autologin->write_conf('output_file');
creates the template
$template = new Libconf::Templates::Generic::KeyValue({
.. arguments ..
})
the options are the same as in Libconf::Templates::Generic::KeyValue, look there to have the complete list.
See <Libconf::Glueconf> for general methods