Libconf::Glueconf::Generic::ValuesSection
Generic/ValuesSection
Libconf::Glueconf::Generic::ValuesSection is a generic template that handles config files that contain semantic informations of type : (KEY - VALUE) and SECTION.
$samba = new Libconf::Glueconf::Generic::ValuesSection({
filename => '/etc/samba/smb.conf'
separator_char => '=',
allow_space => 1,
handle_quote => 0,
handle_multiples_lines => 0,
section_regexp => '^\s*\[([^\]]+)\]\s*$',
section_output_function => sub { "[$_[0]]" },
has_endsection => 0,
endsection_regexp => '',
endsection_output_function => '',
});
$samba->write_conf();
creates the template
$template = new Libconf::Glueconf::Generic::ValuesSection({
.. options ..
})
the options are the same as in Libconf::Templates::Generic::KeyValueSections, look there for details.
See <Libconf::Glueconf> for general methods