NAME

PERL

Libconf::Glueconf::Generic::ValuesSection

C/PYTHON/RUBY

Generic/ValuesSection

DESCRIPTION

Libconf::Glueconf::Generic::ValuesSection is a generic template that handles config files that contain semantic informations of type : (KEY - VALUE) and SECTION.

SYNOPSIS

 $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();

CONSTRUCTOR

new($options)

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.

METHODS

See <Libconf::Glueconf> for general methods