Changes between Version 27 and Version 28 of ModParrotHLLDocs

Show
Ignore:
Timestamp:
12/25/08 22:32:10 (6 years ago)
Author:
jhorwitz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModParrotHLLDocs

    v27 v28  
    8383 
    8484Like the constructor subroutines above, HLL modules can provide subroutines to merge two configurations.  This is useful when, for example, a particular configuration setting for a directory should be overridden by a different setting in a subdirectory.  Or perhaps your HLL is maintaining an array of values for a virtual host that should be concatenated with the array defined in the main server.  All of this behavior is performed by the merge subroutines. 
     85 
     86If a merge subroutine is not provide, Apache will perform the merge itself by completely overriding the base configuration with the new configuration.  This may or may not be desirable for your particular module. 
    8587 
    8688The server merge subroutine is called {{{server_merge}}}, and the directory merge is handled by {{{dir_merge}}}.  They are passed the "base" configuration and the "new" configuration, and are expected to return a merged configuration.  These subroutines should create a new PMC for the merged configuration rather than reusing the PMC from the "new" configuration.  Parrot passes PMCs by reference, and the code would thus be changing the "new" configuration directly, resulting in unexpected behavior.