Changes between Version 39 and Version 40 of ModParrotArchitecture
- Timestamp:
- 12/01/08 16:03:51 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModParrotArchitecture
v39 v40 162 162 Metahandlers are HLL-specific hooks that implement the semantics of that particular HLL module. For example, mod_perl6 request phase handlers expect to receive an Apache::RequestRec object as the first argument. The mod_perl6 metahandlers would be responsible for making sure that happens. Metahandlers are also responsible for running the actual HLL handler code and returning an appropriate status. 163 163 164 Since mod_parrot calls the metahandlers and knows nothing about the semantics of the underlying HLL, metahandlers must have a consistent signature that is independent of the HLL. They do this by accepting a single argument: the context. The context contains all of the Apache data structures in scope for a particular phase, so the metahandler can pick and choose the structurs it needs from the context.165 166 164 Apache cannot call HLL code directly, so mod_parrot registers generic hook functions that call HLL code on its behalf. These functions are in {{{src/mod_parrot.c}}} and have a {{{modparrot_meta_}}} prefix. 165 166 Since mod_parrot knows nothing about the semantics of the underlying HLL layer, metahandlers must have a consistent signature that is independent of the HLL. They do this by accepting a single argument: the context. The context by definition contains all of the Apache data structures in scope for a particular phase, so the metahandler can pick and choose the structures it needs from the context. 167 167 168 168 For details on registering hooks and writing metahandlers, see the [wiki:ModParrotHLLDocs HLL module developer guide].