The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Phrasebook::Loader::ApacheFormat - Config::ApacheFormat phrasebook loader

SYNOPSIS

  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>

DESCRIPTION

This module allows you to use Config::ApacheFormat with Data::Phrasebook. It should function just like any other Data::Phrasebook backend.

BUGS

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.

AUTHOR

Sam Tregar <sam@tregar.com>

Thanks to Plus Three, LP (http://plusthree.com) for sponsoring my work on this module.

COPYRIGHT AND LICENSE

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.