Changes between Version 3 and Version 4 of ModParrotHLLDocs

Show
Ignore:
Timestamp:
12/25/08 18:44:36 (6 years ago)
Author:
jhorwitz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModParrotHLLDocs

    v3 v4  
    3232Bootstrap code must be placed in a PIR subroutine marked with the {{{:load}}} adverb so it is run when the file is loaded.  This subroutine can be named or anonymous (using the {{{:anon}}} adverb). 
    3333 
    34 '''Example: mod_perl6''' 
     34''Example: mod_perl6'' 
    3535 
    3636The first part of the bootstrap file from mod_perl6 loads the compiler and supporting libraries, then executes Perl 6 code from {{{mod_perl6.pm}}}: 
     
    5757=== Creating HLL Configurations === 
    5858 
     59Each 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 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. 
    5960 
     61''Example: the PIR configuration subroutines'' 
     62 
     63{{{ 
     64.namespace [ 'ModParrot'; 'HLL'; 'PIR' ] 
     65 
     66.sub server_create 
     67     $P0 = new 'Hash' 
     68     .return($P0) 
     69.end 
     70 
     71.sub dir_create 
     72     $P0 = new 'Hash' 
     73     .return($P0) 
     74.end 
     75}}} 
    6076 
    6177=== Merging HLL Configurations ===