NAME
Apache2::Translation::File - A provider for Apache2::Translation
SYNOPSIS
<TranslationProvider File>
ConfigFile /path/to/file
NotesDir /path/to/directory
</TranslationProvider>
or
$provider=Apache2::Translation::File->new(ConfigFile=>..., ...);
$provider->start;
$provider->stop;
DESCRIPTION
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.
Parameters
- configfile /path/to/file
-
the configuration file.
- notesdir /path/to/directory
-
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.
Config File Format
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
SEE ALSO
AUTHOR
Torsten Foertsch, <torsten.foertsch@gmx.net>
COPYRIGHT AND LICENSE
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.