Data::Phrasebook::Loader::ApacheFormat - Config::ApacheFormat phrasebook loader
use Data::Phrasebook; # load a phrasebook using Config::ApacheFormat syntax $book = Data::Phrasebook->new(class => 'Plain', loader => 'ApacheFormat', file => 'phrases.conf'); # lookup some values, with optional value replacement $data = $book->fetch('key'); $data = $book->fetch('key2', { name => 'value'}); # switch dictionaries (blocks in the configuration file) $book->dict('NewDict'); # get value for key in the NewDict block $data = $book->fetch('key');
And your configuration file ('phrases.conf' in the code above) looks like:
key "Some ol' value" key2 100.00 <NewDict> key "A special value for NewDict" </NewDict>
This module allows you to use Config::ApacheFormat with Data::Phrasebook. It should function just like any other Data::Phrasebook backend.
I know of no bugs in this module. If you find one, please file a bug report at:
http://rt.cpan.org
Alternately you can email me directly at sam@tregar.com. Please include the version of the module and a complete test case that demonstrates the bug.
Sam Tregar <sam@tregar.com>
Thanks to Plus Three, LP (http://plusthree.com) for sponsoring my work on this module.
Copyright (C) 2005 by Sam Tregar
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Data::Phrasebook::Loader::ApacheFormat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Phrasebook::Loader::ApacheFormat
CPAN shell
perl -MCPAN -e shell install Data::Phrasebook::Loader::ApacheFormat
For more information on module installation, please visit the detailed CPAN module installation guide.