Changes between Version 40 and Version 41 of ModParrotHLLDocs
- Timestamp:
- 01/18/09 17:51:20 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModParrotHLLDocs
v40 v41 59 59 === Creating HLL Configurations === 60 60 61 Each Apache module is responsible for defining and creating its own configuration data structures. When Apache asks an HLL module for a server or directory configuration, mod_parrot will look for a "constructor" subroutine in the {{{ModParrot;HLL;hllname}}} namespace to execute. Server configs are provided by {{{server_create}}}, while directory configs are provided by {{{dir_create}}}. These subroutines should create a data structure, possibly populated with default values, and return it. The type of the structure is up to the implementor, as long as it is a valid Parrot PMC.61 Each Apache module is responsible for defining and creating its own configuration data structures. When Apache asks an HLL module for a server or directory configuration, mod_parrot will look for a "constructor" subroutine in the {{{ModParrot;HLL;hllname}}} namespace to execute. Server configs are provided by {{{server_create}}}, while directory configs are provided by {{{dir_create}}}. Both are passed a ModParrot;Apache;CmdParms object. These subroutines should create a data structure, possibly populated with default values, and return it. The type of the structure is up to the implementor, as long as it is a valid Parrot PMC. 62 62 63 63 ''Signatures'' 64 64 65 * {{{PMC server_create( )}}}66 * {{{PMC dir_create( )}}}65 * {{{PMC server_create(PMC parms)}}} 66 * {{{PMC dir_create(PMC parms)}}} 67 67 68 68 ''Example: the PIR configuration constructors'' … … 72 72 73 73 .sub server_create 74 $P0 = new 'Hash' 75 .return($P0) 74 .param pmc parms 75 $P0 = new 'Hash' 76 .return($P0) 76 77 .end 77 78 78 79 .sub dir_create 79 $P0 = new 'Hash' 80 .return($P0) 80 .param pmc parms 81 $P0 = new 'Hash' 82 .return($P0) 81 83 .end 82 84 }}} … … 221 223 222 224 {{{VOID callback(PMC dircfg, PMC args)}}} 225 * {{{parms}}}: the ModParrot;Apache;CmdParms object for this command 223 226 * {{{dircfg}}}: the current directory configuration 224 227 * {{{args}}}: an array of arguments … … 232 235 {{{ 233 236 .sub cmd_parrothandler 237 .param pmc parms 234 238 .param pmc dircfg 235 239 .param pmc args … … 250 254 {{{ 251 255 .sub cmd_parrotpostconfighandler 256 .param pmc parms 252 257 .param pmc mconfig 253 258 .param pmc args