NAME

Exobrain::Config - Reads exobrain config

VERSION

version 1.08

SYNOPSIS

    my $config = $exobrain->config;         # Preferred
    my $config = Exobrain::Config->new;     # Acceptable

DESCRIPTION

This reads configuration files for exobrain. This first reads the contents of the user's XDG config directory for exobrain (commonly ~/.config/exobrain) in alphabetical order, and then the ~/.exobrainrc file, if it exists. Data read later will override data earlier in the set.

METHODS

write_config

    Exobrain::Config->write_config('Example.ini', $contents);

Writes the contents of a string to the config file specified in the first argument, in the appropriate Exobrain config directory. (Usually ~/.config/exobrain, which will be created if it does not exist.)

Returns the filename written to on success. Raises an exception on failure.

ENVIRONMENT

If the EXOBRAIN_CONFIG environment variable is set, it will be used as the configuration directory to be used. In this case, the user's ~/.exobrainrc file is not read.

AUTHOR

Paul Fenwick <pjf@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Paul Fenwick.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.