| Apache2-Translation documentation | view source | Contained in the Apache2-Translation distribution. |
Apache2::Translation::File - A provider for Apache2::Translation
<TranslationProvider File>
ConfigFile /path/to/file
NotesDir /path/to/directory
</TranslationProvider>
or
$provider=Apache2::Translation::File->new(ConfigFile=>..., ...);
$provider->start;
$provider->stop;
The File provider implements the Apache2::Translation provider interface
as documented in Apache2::Translation::_base. It provides for all optional
functions. No additional functions are supported.
the configuration file.
a directory where comments to the configuration can be stored. Only valid in combination with the admin interface.
The File provider is also capable to read a config file from an open file
handle. Just pass it as configfile. In this case the commit method
returns immediately doing nothing. All changes are lost when the provider
object is purged from memory.
Notes are stored in separate files in the notes directory. So the config file can be taken care of on one system and then moved to the production system where notes are not needed.
The file format is designed to be human readable and writeable and to hold multilined actions.
A block starts with a line that starts with the string >>>
then on the same line follow separated by spaces ID, KEY, URI,
BLOCK and ORDER. The action follows in the next few lines up to but
not including a line that starts again with >>>.
Example:
>>> 1 key uri 0 1 action1 action1 ... >>> 2 key2 uri2 1 2 action2 action2 ... >>> 3 key uri 0 2 action3 action3
Torsten Foertsch, <torsten.foertsch@gmx.net>
Copyright (C) 2005-2008 by Torsten Foertsch
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Apache2-Translation documentation | view source | Contained in the Apache2-Translation distribution. |