Datafile::Hash - README

Datafile::Hash is a lightweight pure-Perl module for reading and writing key-value and INI-style configuration files with sections.

Key features:

Perl License

Installation

perl Makefile.PL
make
make test
make install

Synopsis

use Datafile::Hash qw(readhash writehash);

my %config;

readhash('config.ini', \%config, {
    delimiter => '=',      # triggers INI mode
    group     => 2,        # nested hashes (default)
});

# $config{database}{host} = 'localhost'

writehash('config.ini', \%config, {
    backup  => 1,
    comment => ['Auto-generated', scalar localtime],
});

Functions

Key Options

INI Mode Features

License

This module is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

See the official Perl licensing terms: https://dev.perl.org/licenses/