NAME

DBIx::FileStore::ConfigFile -- Find and read filestore conf files.

SYNOPSIS

my $conf = new DBIx::FileStore::ConfigFile();
my $hashref = $conf->read_config_file();

# these are the fields we use, along wth dbpasswd
print "db: $hashref->{dbname}, user: $hashref->{dbuser}\n";

DESCRIPTION

Provides interface to read DBIx::FileStore configuration files.

The read_config_file() method reads from the optionally passed configuration file, the file .fdbrc in the user's home directory , or /etc/fdb.conf, whichever is found first.

METHODS

new DBIx::FileStore::ConfigFile();

my $conf = new DBIx::FileStore::ConfigFile();

Returns a new DBIx::FileStore::ConfigFile object.

$conf->read_config_file()

my $conf_hash = $conf->read_config_file();

my $conf_hash = $conf->read_config_file( $filename )

Returns a hashref with the name/value pairs parsed from the configuration file. The settings expected by DBIx-Filestore are: dbname, dbuser, and dbpasswd.

If a $filename is passed by the caller, that file is used as the configuration file. Otherwise the module uses the file .fdbrc in the current user's home directory, or /etc/fdb.conf, whichever is found first.

If no configuration file can be found, the method dies with an error message.

COPYRIGHT

Copyright (c) 2010-2017 Josh Rabinowitz, All Rights Reserved.

AUTHORS

Josh Rabinowitz