NAME

Libconf::Templates::Passwd - Libconf low level template for password file styles config files

DESCRIPTION

Libconf::Templates::Passwd is a template that handles files that contain informations like the ones in /etc/passwd, with lines like :

passwd:UID:GID:GECOS:directory:shell

SYNOPSIS

$template = new Libconf::Templates::Passwd({
                                           filename => '/etc/passwd',
                                          });
$template->read_conf();
$template->append_atom( { key => 'account_test',
                          values => { passwd => 'x',
                                      UID => '000123',
                                      GID => '000456',
                                      GECOS => 'This a test stuff',
                                      directory => '/home/test',
                                      shell => '/bin/bash',
                                    },
                          type => 'KEY_VALUES',
                        });
...
(see L<Libconf::Templates> for transformation methods on $template)
...
$template->write_conf('/etc/passwd');

CONSTRUCTOR

new($options)

creates the template

$template = new Libconf::Templates::Passwd({
                                            filename => 'some_file',
                                          })

arguments

$options [type : HASH_REF] specifies the options to create the new template instance.

options

filename [type : STRING, default : ''] : the filename of the config file you want to work on. Can be read and written lately by using set_filename and get_filename.

GENERAL METHODS

See Libconf::Templates for the general list of methods you can call on this template.

SPECIFIC METHODS

There is no specific methods