Snake Lib | ||
---|---|---|
Prev |
Often, creation of a full blown module takes too much time, and a developer may want to lay out a quick prototype in a few seconds. The mod_snake_simple module allows easy creation of very simple modules through simple formats, similar to that of mod_perl.
All of the handler configuration directives take one argument, a module.function pair to call when the cooresponding Apache phase is reached. The directives are: SnakePreConnection, SnakeProcessConnection, SnakePostReadRequest, SnakeTranslateName, SnakeHeaderParser, SnakeAccessChecker, SnakeCheckUserId, SnakeAuthChecker, SnakeTypeChecker, SnakeFixups, SnakeContentHandler, SnakeLogTransaction. To load the mod_snake_simple module, the following directive should be placed within the main configuration file:
SnakeModule mod_snake_simple.SnakeSimple |
SnakeVarSet - Set a variable that simple modules may access. If per-directory variables are available, they are passed to the handler's per-dir argument. Per-server variables are available through a global variable called SnakeServerVars.
In the Apache configuration file and .htaccess files developers may place any of the directives to schedule calls to Python functions whenever the designated Apache phases are reached.
Mod_Snake comes with a few very simple examples in the examples directory.