142 | | === Metahandlers === |
| 142 | === Hooks and Metahandlers === |
| 143 | |
| 144 | Each HLL module can register a hook for each Apache phase. It is not required to register a hook for every phase, though you must register at least one. |
| 145 | |
| 146 | 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. |
| 147 | |
| 148 | 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. |
| 149 | |
| 150 | For details on registering hooks and writing metahandlers, see the [wiki:ModParrotHLLDocs HLL module developer guide]. |