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.
File
Apache2::Translation
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.
configfile
commit
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 >>>.
>>>
ID
KEY
URI
BLOCK
ORDER
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.
To install Apache2::Translation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::Translation
CPAN shell
perl -MCPAN -e shell install Apache2::Translation
For more information on module installation, please visit the detailed CPAN module installation guide.