--- tabea-brainstorming 2002/07/04 06:30:09 1.5
+++ tabea-brainstorming 2002/07/04 06:40:45 1.6
@@ -333,30 +333,30 @@
}
}
- API
- ---
+ Perl API
+ --------
- - handle = create(config, type, prefix)
+ $handle = new Tabea::Config ($config, $type, $prefix);
- Reads config and initializes items with default values.
- Currently the only supported type is HTML2 which causes only
+ Reads $config and initializes items with default values.
+ Currently the only supported $type is "HTML2" which causes only
tags described in RFC1866 to be used. When a menu is rendered,
some elements may require uniqe names in a scope wider than
known by this module, i.e. when two configs are presented on one
screen or along with other information, so every item is
- prefixed.
+ prefixed with $prefix.
- - rc = load(handle, data)
+ $rc = $handle->load($data);
- Reads data and sets the value of items.
+ Reads $data and sets the value of items.
- - rc = save(handle, data)
+ $rc = $handle->save($data);
Writes items including their values.
- - rc = render(handle, buffer)
+ $rc = $handle->render($buffer);
- Renders a menu writes it into the buffer. The contents of the
+ Renders a menu and writes it into the buffer. The contents of the
buffer can be merged into a larger output. Values are verified
and invalid data is marked (FIXME how? red, reset to default,
configurable behaviour, configurable error messages ...) The
@@ -364,17 +364,17 @@
back it must identify menu activity (i.e. by checking the
prefix) and call render again and again or execute some action.
- - rc = import(handle, legacyfile)
+ $rc = $handle->import($legacyfile);
Reads a legacy (manually edited or previously exported) file and
tries to match out values.
- - rc = export(handle, template, exportfile)
+ $rc = $handle->export($template, $exportfile);
Applies variable substitution for a template and writes the
result out to exportfile.
- - rc = destroy(handle)
+ $rc = $handle->destroy();
Example: Generic RAID configuration
-----------------------------------
|