| 310 | === Retrieving Configurations === |
| 311 | |
| 312 | No configuration information is passed directly to metahandlers, so they should use {{{ModParrot;Apache;get_config}}} to retrieve configuration structures. |
| 313 | |
| 314 | To retrieve a server configuration: |
| 315 | |
| 316 | {{{ |
| 317 | .local pmc cfg, get_config |
| 318 | get_config = get_root_global ['ModParrot';'Apache'], 'get_config' |
| 319 | cfg = get_config("my_module_name") |
| 320 | }}} |
| 321 | |
| 322 | To retrieve a directory configuration, use the {{{per_dir_config}}} method of {{{ModParrot;Apache;RequestRec}}}: |
| 323 | |
| 324 | {{{ |
| 325 | .local pmc dircfg, get_config, per_dir_config |
| 326 | get_config = get_root_global ['ModParrot';'Apache'], 'get_config' |
| 327 | per_dir_config = r.'per_dir_config'() |
| 328 | dircfg = get_config("my_module_name", per_dir_config) |
| 329 | }}} |
| 330 | |