DBIx::FileStore::ConfigFile -- Find and read filestore conf files.
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";
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.
my $conf = new DBIx::FileStore::ConfigFile();
Returns a new DBIx::FileStore::ConfigFile object.
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 (c) 2010-2012 Josh Rabinowitz, All Rights Reserved.
Josh Rabinowitz
To install DBIx::FileStore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::FileStore
CPAN shell
perl -MCPAN -e shell install DBIx::FileStore
For more information on module installation, please visit the detailed CPAN module installation guide.