Changes between Version 50 and Version 51 of ModParrotArchitecture
- Timestamp:
- 05/10/09 15:21:54 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModParrotArchitecture
v50 v51 16 16 * Context: a data structure containing information about the current connection 17 17 * Interpreter: a Parrot interpreter ({{{Parrot_Interp}}}) 18 * Context pool: a pool of contexts that implements interpreter pools for threaded MPMs 18 19 19 20 == mod_parrot Module == … … 39 40 If you are running handlers written in PIR and are including files from the Parrot runtime directory via {{{.include}}}, you will need to set the {{{PARROT_RUNTIME}}} environment variable. This is not required if you have compiled your handlers to PBC. 40 41 41 For libraries loaded via {{{load_bytecode}}}, you can add paths to Parrot's library search path with {{{Parrot IncludePath}}}. The name of this directive is misleading and will eventually be renamed to {{{ParrotLibraryPath}}}.42 For libraries loaded via {{{load_bytecode}}}, you can add paths to Parrot's library search path with {{{ParrotLibraryPath}}}. 42 43 43 44 '''Loading Code''' … … 192 193 char *name; 193 194 modparrot_module_info *minfo; 195 const char *ctx_pool_name; 196 apr_array_header_t *ctx_pool; 194 197 Parrot_PMC cfg; 195 198 }; … … 217 220 === Module Scope === 218 221 219 Apache makes an obvious but significant assumption about module code. It assumes your code knows the module to which it belongs. So the code formod_cgi KNOWS it's part of mod_cgi, and, as an example, its response handler can ask for the mod_cgi configuration structure appropriately. So Apache provides no infrastructure for asking it what module code it's currently executing -- it assumes you know who you are.222 Apache makes an obvious but significant assumption about module code. It assumes your code knows the module to which it belongs. For example, code in mod_cgi KNOWS it's part of mod_cgi, and, as an example, its response handler can ask for the mod_cgi configuration structure appropriately. So Apache provides no infrastructure for asking it what module code it's currently executing -- it assumes you know who you are. 220 223 221 224 This is a big problem for mod_parrot, which provides SHARED hooks to support multiple HLL modules. The same hook is called regardless of which HLL module is currently in scope, and Apache won't tell you which module it is. This comes into play in three places: … … 234 237 and retrieve the module structure: 235 238 {{{ 236 mpcfg = ap_get_module_config(our_server->module_config, &parrot_module); 237 modp = ((module **)mpcfg->module_array->elts)[module_index]; 239 mpcfg = ap_get_module_config(mp_globals.base_server->module_config, 240 &parrot_module); 241 modp = ((module **)mp_globals.module_array->elts)[module_index]; 238 242 }}} 239 243