[svn:mod_parrot] r240 - in mod_parrot/trunk: build/lib/Generator lib/APR lib/Apache lib/ModParrot lib/ModParrot/HLL src t/lib

[email protected]
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Tue Aug 28 09:41:45 2007
New Revision: 240

Modified:
   mod_parrot/trunk/build/lib/Generator/ApacheConstants.pm
   mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm
   mod_parrot/trunk/lib/APR/Table.pir
   mod_parrot/trunk/lib/Apache/RequestRec.pir
   mod_parrot/trunk/lib/ModParrot/HLL/perl6.pir
   mod_parrot/trunk/lib/ModParrot/HLL/pir.pir
   mod_parrot/trunk/lib/ModParrot/init.pir
   mod_parrot/trunk/src/context.c
   mod_parrot/trunk/src/mod_parrot.c
   mod_parrot/trunk/t/lib/handlers.pir

Log:
use nested namespaces
use new PDD15 object model
update deprecated ops with current ones


Modified: mod_parrot/trunk/build/lib/Generator/ApacheConstants.pm
==============================================================================
--- mod_parrot/trunk/build/lib/Generator/ApacheConstants.pm	(original)
+++ mod_parrot/trunk/build/lib/Generator/ApacheConstants.pm	Tue Aug 28 09:41:45 2007
@@ -118,6 +118,6 @@
     # Log Severities
 %%LOG%%
 
-    store_global 'Apache::Constants', 'ap_constants', ap_constants
+    set_root_global [ 'Apache::Constants' ], 'ap_constants', ap_constants
 .end
 

Modified: mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm
==============================================================================
--- mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm	(original)
+++ mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm	Tue Aug 28 09:41:45 2007
@@ -70,7 +70,7 @@
 {
     my $template = <<'END'
 dlfunc func, nul, "mpnci_request_rec_%%NAME%%", "%%SIG%%"
-store_global "ModParrot::NCI", "request_rec_%%NAME%%", func
+set_root_global [ '_modparrot'; 'NCI' ], "request_rec_%%NAME%%", func
 
 END
 ;
@@ -133,14 +133,12 @@
     .param int data :optional
     .param int update_r :opt_flag
     .local pmc r
-    .local int offset
     .local pmc request_rec_%%NAME%%
     .local int %%NAME%%
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global request_rec_%%NAME%%, 'ModParrot::NCI', 'request_rec_%%NAME%%'
+    request_rec_%%NAME%% = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_%%NAME%%'
     %%NAME%% = request_rec_%%NAME%%( r , data, update_r )
 
     .pcc_begin_return
@@ -156,7 +154,6 @@
 .sub %%NAME%% :method
     .param int data
     .local pmc r
-    .local int offset
     .local pmc request_rec_%%NAME%%
     .local int %%NAME%%
     .local int update_r
@@ -166,10 +163,9 @@
     update_r = 1
 
 done:
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global request_rec_%%NAME%%, 'ModParrot::NCI', 'request_rec_%%NAME%%'
+    request_rec_%%NAME%% = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_%%NAME%%'
     %%NAME%% = request_rec_%%NAME%%( r , data, update_r )
 
     .pcc_begin_return
@@ -193,18 +189,16 @@
     .param %%PIR_TYPE%% data :optional
     .param int update_r :opt_flag
     .local pmc r
-    .local int offset
     .local pmc request_rec_%%NAME%%
     .local %%PIR_TYPE%% %%NAME%%
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
     if update_r goto call_it
     data = ""
 
 call_it:
-    find_global request_rec_%%NAME%%, 'ModParrot::NCI', 'request_rec_%%NAME%%'
+    request_rec_%%NAME%% = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_%%NAME%%'
     %%NAME%% = request_rec_%%NAME%%( r , data, update_r )
 
     .pcc_begin_return

Modified: mod_parrot/trunk/lib/APR/Table.pir
==============================================================================
--- mod_parrot/trunk/lib/APR/Table.pir	(original)
+++ mod_parrot/trunk/lib/APR/Table.pir	Tue Aug 28 09:41:45 2007
@@ -36,7 +36,7 @@
 
 =cut
 
-.namespace [ 'APR::Table' ]
+.namespace [ 'APR'; 'Table' ]
 
 .sub _initialize :load
     .local pmc table_class
@@ -45,21 +45,14 @@
 
     null nul
 
-    newclass table_class, 'APR::Table'
+    newpdd15class table_class, [ 'APR'; 'Table' ]
     addattribute table_class, 'apr_table'
 
     dlfunc func, nul, "apr_table_get", "tpt"
-    store_global "APR::NCI", "apr_table_get", func
+    set_root_global [ 'APR'; 'NCI' ], "apr_table_get", func
 
     dlfunc func, nul, "apr_table_set", "vptt"
-    store_global "APR::NCI", "apr_table_set", func
-.end
-
-.sub init_pmc :vtable :method
-    .param pmc t
-    .local int offset
-
-    setattribute self, 'apr_table', t
+    set_root_global [ 'APR'; 'NCI' ], "apr_table_set", func
 .end
 
 =item C<APR::Table get(STRING key)>
@@ -79,9 +72,8 @@
     .local string val
     .local int offset
 
-    classoffset offset, self, 'APR::Table'
-    getattribute t, self, offset
-    find_global apr_table_get, 'APR::NCI', 'apr_table_get'
+    getattribute t, self, 'apr_table'
+    apr_table_get = get_root_global [ 'APR'; 'NCI' ], 'apr_table_get'
     val = apr_table_get(t, key)
 
     .pcc_begin_return
@@ -106,9 +98,8 @@
     .local pmc apr_table_set
     .local int offset
 
-    classoffset offset, self, 'APR::Table'
-    getattribute t, self, offset
-    find_global apr_table_set, 'APR::NCI', 'apr_table_set'
+    getattribute t, self, 'apr_table'
+    apr_table_set = get_root_global [ 'APR'; 'NCI' ], 'apr_table_set'
     apr_table_set(t, key, val)
 .end
     

Modified: mod_parrot/trunk/lib/Apache/RequestRec.pir
==============================================================================
--- mod_parrot/trunk/lib/Apache/RequestRec.pir	(original)
+++ mod_parrot/trunk/lib/Apache/RequestRec.pir	Tue Aug 28 09:41:45 2007
@@ -22,8 +22,7 @@
 
  .local pmc r
 
- find_type $I0, 'Apache::RequestRec'
- r = new $I0
+ r = new [ 'Apache'; 'RequestRec' ]
 
  r.'content_type'("text/html")
  r.'puts'("Hello world")
@@ -40,7 +39,7 @@
 
 =cut
 
-.namespace [ 'Apache::RequestRec' ]
+.namespace [ 'Apache'; 'RequestRec' ]
 
 .sub _initialize :load
     .local pmc rr_class
@@ -49,52 +48,49 @@
 
     null nul
 
-    newclass rr_class, 'Apache::RequestRec'
+    newpdd15class rr_class, [ 'Apache'; 'RequestRec' ]
     addattribute rr_class, 'r'
 
     dlfunc func, nul, "ap_rputs", "itp"
-    store_global "Apache::NCI", "ap_rputs", func
+    set_root_global [ 'Apache'; 'NCI' ], "ap_rputs", func
 
     dlfunc func, nul, "ap_rputc", "iip"
-    store_global "Apache::NCI", "ap_rputc", func
+    set_root_global [ 'Apache'; 'NCI' ], "ap_rputc", func
 
     dlfunc func, nul, "ap_log_rerror", "vtiiiptt"
-    store_global "Apache::NCI", "ap_log_rerror", func
+    set_root_global [ 'Apache'; 'NCI' ], "ap_log_rerror", func
 
     dlfunc func, nul, "ap_is_initial_req", "ip"
-    store_global "Apache::NCI", "ap_is_initial_req", func
+    set_root_global [ 'Apache'; 'NCI' ], "ap_is_initial_req", func
 
     dlfunc func, nul, "ap_auth_type", "tp"
-    store_global "Apache::NCI", "ap_auth_type", func
+    set_root_global [ 'Apache'; 'NCI' ], "ap_auth_type", func
 
     dlfunc func, nul, "ap_auth_name", "tp"
-    store_global "Apache::NCI", "ap_auth_name", func
+    set_root_global [ 'Apache'; 'NCI' ], "ap_auth_name", func
 
     dlfunc func, nul, "ap_note_basic_auth_failure", "vp"
-    store_global "Apache::NCI", "ap_note_basic_auth_failure", func
+    set_root_global [ 'Apache'; 'NCI' ], "ap_note_basic_auth_failure", func
 
     dlfunc func, nul, "ap_custom_response", "vpit"
-    store_global "Apache::NCI", "ap_custom_response", func
+    set_root_global [ 'Apache'; 'NCI' ], "ap_custom_response", func
 .end
 
-#.sub __init :method
 .sub init :vtable :method
-    .param pmc new_r :optional
     .local pmc request_rec
     .local pmc r
-    .local int offset
 
-    if_null new_r, GET_R
-    r = new_r
-    goto SETUP_R
-GET_R:
-    find_global request_rec, 'ModParrot::NCI', 'request_rec'
+    request_rec = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec'
     r = request_rec( )
-SETUP_R:
-    classoffset offset, self, 'Apache::RequestRec'
-    setattribute self, offset, r
+    setattribute self, 'r', r
 .end
 
+#.sub init_pmc :vtable :method
+#    .param pmc r
+#
+#    setattribute self, 'r', r
+#.end
+
 .include 'build/src/pir/request_rec.pir'
 
 =item C<puts(STRING str)>
@@ -111,11 +107,9 @@
     .param string data
     .local pmc r
     .local pmc ap_rputs
-    .local int offset
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
-    find_global ap_rputs, 'Apache::NCI', 'ap_rputs'
+    getattribute r, self, 'r'
+    ap_rputs = get_root_global [ 'Apache'; 'NCI' ], 'ap_rputs'
     ap_rputs( data, r )
 .end
 
@@ -133,11 +127,9 @@
     .param int data
     .local pmc r
     .local pmc ap_rputc
-    .local int offset
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
-    find_global ap_rputc, 'Apache::NCI', 'ap_rputc'
+    getattribute r, self, 'r'
+    ap_rputc = get_root_global [ 'Apache'; 'NCI' ], 'ap_rputc'
     ap_rputc( data, r )
 .end
 
@@ -159,12 +151,10 @@
     .param int size
     .local pmc r
     .local pmc ap_rwrite
-    .local int offset
     .local int bytes
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
-    find_global ap_rwrite, 'ModParrot::NCI', 'rwrite'
+    getattribute r, self, 'r'
+    ap_rwrite = get_root_global [ '_modparrot'; 'NCI' ], 'rwrite'
     bytes = ap_rwrite( data, size, r )
 
     .pcc_begin_return
@@ -186,12 +176,10 @@
     .param string f
     .local pmc r
     .local pmc request_rec_filename
-    .local int offset
     .local string filename
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
-    find_global request_rec_filename, 'ModParrot::NCI', 'request_rec_filename'
+    getattribute r, self, 'r'
+    request_rec_filename = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_filename'
     filename = request_rec_filename( r, f )
 
     .pcc_begin_return
@@ -219,12 +207,10 @@
     .param int level
     .param string msg 
     .local pmc r
-    .local int offset
     .local pmc ap_log_rerror
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
-    find_global ap_log_rerror, 'Apache::NCI', 'ap_log_rerror'
+    getattribute r, self, 'r'
+    ap_log_rerror = get_root_global [ 'Apache'; 'NCI' ], 'ap_log_rerror'
     ap_log_rerror( file, line, level, 0, r, "%s", msg )
 .end
 
@@ -242,15 +228,13 @@
 
 .sub get_basic_auth_pw :method
     .local pmc r
-    .local int offset
     .local pmc request_rec_get_basic_auth_pw
     .local string pw
     .local int status
     .local pmc results
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
-    find_global request_rec_get_basic_auth_pw, 'ModParrot::NCI', 'request_rec_get_basic_auth_pw'
+    getattribute r, self, 'r'
+    request_rec_get_basic_auth_pw = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_get_basic_auth_pw'
 
     results = new .Array
     results = 2
@@ -277,13 +261,11 @@
 
 .sub is_initial_req :method
     .local pmc r
-    .local int offset
     .local pmc ap_is_initial_req
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global ap_is_initial_req, 'Apache::NCI', 'ap_is_initial_req'
+    ap_is_initial_req = get_root_global [ 'Apache'; 'NCI' ], 'ap_is_initial_req'
     $I0 = ap_is_initial_req( r )
 
     .pcc_begin_return
@@ -303,13 +285,11 @@
 
 .sub auth_name :method
     .local pmc r
-    .local int offset
     .local pmc ap_auth_name
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global ap_auth_name, 'Apache::NCI', 'ap_auth_name'
+    ap_auth_name = get_root_global [ 'Apache'; 'NCI' ], 'ap_auth_name'
     $S0 = ap_auth_name( r )
 
     .pcc_begin_return
@@ -330,13 +310,11 @@
 
 .sub note_basic_auth_failure :method
     .local pmc r
-    .local int offset
     .local pmc ap_note_basic_auth_failure
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global ap_note_basic_auth_failure, 'Apache::NCI', 'ap_note_basic_auth_failure'
+    ap_note_basic_auth_failure = get_root_global [ 'Apache'; 'NCI' ], 'ap_note_basic_auth_failure'
     ap_note_basic_auth_failure( r )
 .end
 
@@ -352,13 +330,11 @@
 
 .sub auth_type :method
     .local pmc r
-    .local int offset
     .local pmc ap_auth_type
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global ap_auth_type, 'Apache::NCI', 'ap_auth_type'
+    ap_auth_type = get_root_global [ 'Apache'; 'NCI' ], 'ap_auth_type'
     $S0 = ap_auth_type( r )
 
     .pcc_begin_return
@@ -381,15 +357,16 @@
     .local pmc notes
     .local pmc t
     .local pmc request_rec_notes
-    .local int offset
  
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global request_rec_notes, 'ModParrot::NCI', 'request_rec_notes'
+    request_rec_notes = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_notes'
     notes = request_rec_notes( r )
 
-    t = new 'APR::Table', notes
+    $P0 = get_class [ 'APR'; 'Table' ]
+    $P1 = new .Hash
+    $P1['apr_table'] = notes
+    t = new $P0, $P1
 
     .pcc_begin_return
         .return t
@@ -410,12 +387,10 @@
     .local pmc r
     .local pmc main_r
     .local pmc request_rec_main
-    .local int offset
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global request_rec_main, 'ModParrot::NCI', 'request_rec_main'
+    request_rec_main = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_main'
     main_r = request_rec_main( r )
 
     .pcc_begin_return
@@ -437,12 +412,10 @@
     .local pmc r
     .local pmc next_r
     .local pmc request_rec_next
-    .local int offset
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global request_rec_next, 'ModParrot::NCI', 'request_rec_next'
+    request_rec_next = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_next'
     next_r = request_rec_next( r )
 
     .pcc_begin_return
@@ -464,14 +437,15 @@
     .local pmc r
     .local pmc prev_r
     .local pmc request_rec_prev
-    .local int offset
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global request_rec_prev, 'ModParrot::NCI', 'request_rec_prev'
-    $P0 = request_rec_prev( r )
-    prev_r = new 'Apache::RequestRec', $P0
+    request_rec_prev = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_prev'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    $P1 = request_rec_prev( r )
+    $P2 = new .Hash
+    $P2['r'] = $P1
+    prev_r = new $P0, $P2
 
     .pcc_begin_return
         .return prev_r
@@ -494,12 +468,10 @@
     .param string response
     .local pmc r
     .local pmc ap_custom_response
-    .local int offset
 
-    classoffset offset, self, 'Apache::RequestRec'
-    getattribute r, self, offset
+    getattribute r, self, 'r'
 
-    find_global ap_custom_response, 'Apache::NCI', 'ap_custom_response'
+    ap_custom_response = get_root_global [ 'Apache'; 'NCI' ], 'ap_custom_response'
     ap_custom_response(r, status, response)
 .end
 

Modified: mod_parrot/trunk/lib/ModParrot/HLL/perl6.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/HLL/perl6.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/HLL/perl6.pir	Tue Aug 28 09:41:45 2007
@@ -61,7 +61,7 @@
 
 RUN_HANDLER:
     # run the handler, passing in Apache::RequestRec object
-    r = new 'Apache::RequestRec'
+    r = new [ 'Apache'; 'RequestRec' ]
     status = handler(r)
 
     # return status code

Modified: mod_parrot/trunk/lib/ModParrot/HLL/pir.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/HLL/pir.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/HLL/pir.pir	Tue Aug 28 09:41:45 2007
@@ -31,7 +31,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -51,7 +52,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -71,7 +73,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -91,7 +94,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -115,15 +119,15 @@
     .local int status
 
     # get the pool objects
-    find_global func, 'ModParrot::NCI', 'conf_pool'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'conf_pool'
     pconf = func()
-    find_global func, 'ModParrot::NCI', 'log_pool'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'log_pool'
     plog = func()
-    find_global func, 'ModParrot::NCI', 'temp_pool'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'temp_pool'
     ptemp = func()
 
     # get the server_rec object
-    find_global func, 'ModParrot::NCI', 'server_rec'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'server_rec'
     s = func()
 
     # find the handler sub and call it
@@ -148,15 +152,15 @@
     .local int status
 
     # get the pool objects
-    find_global func, 'ModParrot::NCI', 'conf_pool'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'conf_pool'
     pconf = func()
-    find_global func, 'ModParrot::NCI', 'log_pool'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'log_pool'
     plog = func()
-    find_global func, 'ModParrot::NCI', 'temp_pool'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'temp_pool'
     ptemp = func()
 
     # get the server_rec object
-    find_global func, 'ModParrot::NCI', 'server_rec'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'server_rec'
     s = func()
 
     # find the handler sub and call it
@@ -179,11 +183,11 @@
     .local int status
 
     # get the pool object
-    find_global func, 'ModParrot::NCI', 'child_pool'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'child_pool'
     pchild = func()
 
     # get the server_rec object
-    find_global func, 'ModParrot::NCI', 'server_rec'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'server_rec'
     s = func()
 
     # find the handler sub and call it
@@ -206,11 +210,11 @@
     .local int status
 
     # get the conn_rec object
-    find_global func, 'ModParrot::NCI', 'conn_rec'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'conn_rec'
     c = func()
 
     # get the csd object
-    find_global func, 'ModParrot::NCI', 'csd'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'csd'
     csd = func()
 
     # find the handler sub and call it
@@ -232,7 +236,7 @@
     .local int status
 
     # get the pool object
-    find_global func, 'ModParrot::NCI', 'conn_rec'
+    func = get_root_global [ '_modparrot'; 'NCI' ], 'conn_rec'
     c = func()
 
     # find the handler sub and call it
@@ -254,7 +258,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -275,7 +280,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -296,7 +302,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -317,8 +324,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
-    r = new $I0
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -339,7 +346,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -360,7 +368,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'
@@ -380,7 +389,8 @@
     .local int status
 
     # get the request_rec object
-    r = new 'Apache::RequestRec'
+    $P0 = get_class [ 'Apache'; 'RequestRec' ]
+    r = new $P0
 
     # find the handler sub and call it
     find_global handler, handler_name, '_handler'

Modified: mod_parrot/trunk/lib/ModParrot/init.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/init.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/init.pir	Tue Aug 28 09:41:45 2007
@@ -14,10 +14,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-.namespace [ 'ModParrot' ]
+.namespace [ '_modparrot' ]
 
 # use when NCI can dlfunc from the current image
-.sub _modparrot_init
+.sub modparrot_init
     .local pmc func
     .local pmc nul
 
@@ -26,50 +26,51 @@
     .include "build/src/pir/request_rec_dlfunc.pir"
 
     dlfunc func, nul, "mpnci_backtrace", "tJ"
-    store_global "ModParrot::NCI", "backtrace", func
+    set_root_global [ '_modparrot'; 'NCI' ], "backtrace", func
 
     dlfunc func, nul, "mpnci_request_rec", "pJ"
-    store_global "ModParrot::NCI", "request_rec", func
+    set_root_global [ '_modparrot'; 'NCI' ], "request_rec", func
 
     dlfunc func, nul, "mpnci_request_rec_main", "pJp"
-    store_global "ModParrot::NCI", "request_rec_main", func
+    set_root_global [ '_modparrot'; 'NCI' ], "request_rec_main", func
 
     dlfunc func, nul, "mpnci_request_rec_next", "pJp"
-    store_global "ModParrot::NCI", "request_rec_next", func
+    set_root_global [ '_modparrot'; 'NCI' ], "request_rec_next", func
 
     dlfunc func, nul, "mpnci_request_rec_prev", "pJp"
-    store_global "ModParrot::NCI", "request_rec_prev", func
+    set_root_global [ '_modparrot'; 'NCI' ], "request_rec_prev", func
 
     dlfunc func, nul, "mpnci_request_rec_user", "tJpti"
-    store_global "ModParrot::NCI", "request_rec_user", func
+    set_root_global [ '_modparrot'; 'NCI' ], "request_rec_user", func
 
     dlfunc func, nul, "mpnci_request_rec_notes", "pJp"
-    store_global "ModParrot::NCI", "request_rec_notes", func
+    set_root_global [ '_modparrot'; 'NCI' ], "request_rec_notes", func
 
     dlfunc func, nul, "mpnci_request_rec_get_basic_auth_pw", "iJpP"
-    store_global "ModParrot::NCI", "request_rec_get_basic_auth_pw", func
+    set_root_global [ '_modparrot'; 'NCI' ], "request_rec_get_basic_auth_pw", func
 
     dlfunc func, nul, "mpnci_rwrite", "iJPip"
-    store_global "ModParrot::NCI", "rwrite", func
+    set_root_global [ '_modparrot'; 'NCI' ], "rwrite", func
 
     dlfunc func, nul, "mpnci_conf_pool", "pJ"
-    store_global "ModParrot::NCI", "conf_pool", func
+    set_root_global [ '_modparrot'; 'NCI' ], "conf_pool", func
 
     dlfunc func, nul, "mpnci_temp_pool", "pJ"
-    store_global "ModParrot::NCI", "temp_pool", func
+    set_root_global [ '_modparrot'; 'NCI' ], "temp_pool", func
 
     dlfunc func, nul, "mpnci_log_pool", "pJ"
-    store_global "ModParrot::NCI", "log_pool", func
+    set_root_global [ '_modparrot'; 'NCI' ], "log_pool", func
 
     dlfunc func, nul, "mpnci_child_pool", "pJ"
-    store_global "ModParrot::NCI", "child_pool", func
+    set_root_global [ '_modparrot'; 'NCI' ], "child_pool", func
 
     dlfunc func, nul, "mpnci_server_rec", "pJ"
-    store_global "ModParrot::NCI", "server_rec", func
+    set_root_global [ '_modparrot'; 'NCI' ], "server_rec", func
+
     dlfunc func, nul, "mpnci_conn_rec", "pJ"
-    store_global "ModParrot::NCI", "conn_rec", func
+    set_root_global [ '_modparrot'; 'NCI' ], "conn_rec", func
 
     dlfunc func, nul, "mpnci_csd", "pJ"
-    store_global "ModParrot::NCI", "csd", func
+    set_root_global [ '_modparrot'; 'NCI' ], "csd", func
 
 .end

Modified: mod_parrot/trunk/src/context.c
==============================================================================
--- mod_parrot/trunk/src/context.c	(original)
+++ mod_parrot/trunk/src/context.c	Tue Aug 28 09:41:45 2007
@@ -95,7 +95,7 @@
     Parrot_PMC_set_pointer(interp, p, ctx);
     /* XXX should create parrot strings ahead of time -- they're constant! */
     Parrot_store_global_s(interp,
-        MAKE_PARROT_STRING("ModParrot"),
+        MAKE_PARROT_STRING("_modparrot"),
         MAKE_PARROT_STRING("__context"),
         p);
 
@@ -109,7 +109,7 @@
 
     /* XXX should create parrot strings ahead of time -- they're constant! */
     p = Parrot_find_global_s(interp,
-        MAKE_PARROT_STRING("ModParrot"), 
+        MAKE_PARROT_STRING("_modparrot"), 
         MAKE_PARROT_STRING("__context"));
     if (p) {
         ctx = Parrot_PMC_get_pointer(interp, p);

Modified: mod_parrot/trunk/src/mod_parrot.c
==============================================================================
--- mod_parrot/trunk/src/mod_parrot.c	(original)
+++ mod_parrot/trunk/src/mod_parrot.c	Tue Aug 28 09:41:45 2007
@@ -61,7 +61,7 @@
     /* run initialization code */
     if (cfg->init_path) {
         modparrot_load_bytecode(interp, cfg->init_path);
-        modparrot_call_sub(interp, "ModParrot", "_modparrot_init");
+        modparrot_call_sub(interp, "_modparrot", "modparrot_init");
     }
 
     /* set our context

Modified: mod_parrot/trunk/t/lib/handlers.pir
==============================================================================
--- mod_parrot/trunk/t/lib/handlers.pir	(original)
+++ mod_parrot/trunk/t/lib/handlers.pir	Tue Aug 28 09:41:45 2007
@@ -9,7 +9,7 @@
     r.'content_type'('text/plain')
     r.'puts'("testing\n")
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -25,7 +25,7 @@
 
     r.'puts'("Testing 123\n")
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -43,7 +43,7 @@
     $P0 = "Testing 123\n"
     r.'write'($P0, 12)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -61,7 +61,7 @@
     args = r.'args'( )
     r.'puts'(args)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -79,7 +79,7 @@
     hostname = r.'hostname'( )
     r.'puts'(hostname)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -95,7 +95,7 @@
     .local int level
 
     # use EMERG to make sure the log gets through
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     level = ap_const['APLOG_EMERG']
 
     r.'log_rerror'('test', 0, level, 'testing')
@@ -115,7 +115,7 @@
 
     r.'puts'("Access granted.")
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -129,7 +129,7 @@
     .param pmc r
     .local pmc ap_const
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     $S0 = r.'args'( )
@@ -154,7 +154,7 @@
     ($I0, $S1) = r.'get_basic_auth_pw'( )
     $S0 = r.'user'( )
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
 
     if $S0 != 'joeuser' goto auth_failed
     if $S1 != 'password' goto auth_failed
@@ -177,7 +177,7 @@
     .param pmc r
     .local pmc ap_const
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     $S0 = r.'args'( )
@@ -199,7 +199,7 @@
     .param pmc r
     .local pmc ap_const
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     r.'puts'('Hello World')
@@ -218,7 +218,7 @@
     $S0 = r.'auth_type'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -235,7 +235,7 @@
     $S0 = r.'auth_name'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -252,7 +252,7 @@
     $S0 = r.'the_request'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -269,7 +269,7 @@
     $S0 = r.'protocol'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -286,7 +286,7 @@
     $S0 = r.'status_line'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -303,7 +303,7 @@
     $S0 = r.'range'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -320,7 +320,7 @@
     $S0 = r.'handler'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -337,7 +337,7 @@
     $S0 = r.'content_encoding'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -354,7 +354,7 @@
     $S0 = r.'vlist_validator'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -371,7 +371,7 @@
     $S0 = r.'unparsed_uri'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -388,7 +388,7 @@
     $S0 = r.'uri'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -405,7 +405,7 @@
     $S0 = r.'path_info'( )
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -422,7 +422,7 @@
     $I0 = r.'assbackwards'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -439,7 +439,7 @@
     $I0 = r.'proxyreq'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -456,7 +456,7 @@
     $I0 = r.'header_only'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -473,7 +473,7 @@
     $I0 = r.'proto_num'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -490,7 +490,7 @@
     $I0 = r.'method_number'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -507,7 +507,7 @@
     $I0 = r.'chunked'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -524,7 +524,7 @@
     $I0 = r.'read_body'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -541,7 +541,7 @@
     $I0 = r.'read_chunked'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -558,7 +558,7 @@
     $I0 = r.'no_cache'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -575,7 +575,7 @@
     $I0 = r.'no_local_copy'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -592,7 +592,7 @@
     $I0 = r.'used_path_info'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -609,7 +609,7 @@
     $I0 = r.'eos_sent'( )
     r.'putc'($I0)
  
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
  
     .pcc_begin_return
@@ -628,7 +628,7 @@
     $S0 = $P0.'get'('foo')
     r.'puts'($S0)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
@@ -644,7 +644,7 @@
 
     r.'status'(201)
 
-    ap_const = find_global 'Apache::Constants', 'ap_constants'
+    ap_const = get_root_global [ 'Apache::Constants' ], 'ap_constants'
     $I0 = ap_const['OK']
 
     .pcc_begin_return
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.