NAME
Config::KeyValue - Module for reading simple "KEY=VALUE" formatted configuration files.
VERSION
Version 0.02
SYNOPSIS
use Config::KeyValue;
# Instantiate
my $cfg = Config::KeyValue->new();
# Parse file, returning found key-value pairs
my $parsed_config = $cfg->load_file('/path/to/your/config/file');
# Fetch a specific key
print $cfg->get('SOME_CONFIGURATON_KEY'), "\n";
# Fetch a specific key with leading-and-trailing quotes removed
print $cfg->get_tidy('SOME_CONFIGURATON_KEY'), "\n";
FUNCTIONS
new()
Constructor.
get(key)
Get configuration value for key. Returns an empty string if key is not defined.
get_tidy(key)
Get configuration value for key, stripping leading and trailing matching quote characters (e.g. ', "). Returns an empty string if key is not defined.
load_file(file_name)
Read configuration information from file_name. Returns hashref of configuration key=value pairs.
AUTHOR
blair christensen, <blair.christensen at gmail.com>
BUGS
Please report any bugs or feature requests to bug-config-keyvalue at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Config-KeyValue. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Config::KeyValue
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2008 blair christensen, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.