[svn:mod_parrot] r264 - mod_parrot/trunk/lib/ModParrot/HLL

[email protected]
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Fri Dec  7 11:18:29 2007
New Revision: 264

Modified:
   mod_parrot/trunk/lib/ModParrot/HLL/plumhead.pir

Log:
[plumhead] populate $_GET superglobal with query string args


Modified: mod_parrot/trunk/lib/ModParrot/HLL/plumhead.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/HLL/plumhead.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/HLL/plumhead.pir	Fri Dec  7 11:18:29 2007
@@ -18,6 +18,7 @@
 
 .sub __onload :anon :load
     load_bytecode 'languages/plumhead/plumhead.pbc'
+    load_bytecode 'CGI/QueryHash.pbc'
 .end
 
 .sub run_php_file
@@ -37,12 +38,22 @@
     .local pmc r
     .local pmc ap_const
     .local pmc pio
+    .local string args
     .local int status
+    .local pmc query_parse
+    .local pmc get_hash, post_hash
 
     # get the request_rec object
     $P0 = get_class [ 'Apache'; 'RequestRec' ]
     r = new $P0
 
+    # parse query string
+    args = r.'args'()
+    query_parse = get_hll_global [ 'CGI'; 'QueryHash' ], 'parse'
+    get_hash = new 'Hash'
+    get_hash = query_parse(args)
+    set_hll_global '$_GET', get_hash
+    
     php_file = r.'filename'()
     pio = getstdout
     push pio, "string"
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.