Home  |  Linux  | Mysql  | PHP  | XML
From:jhorwitz@cvs.perl.org Date:Thu Sep 25 13:21:25 2008
Subject:[svn:mod_parrot] r453 - in mod_parrot/trunk: build/lib/Generator eg/pir lib/Apache lib/ModParrot lib/ModParrot/HLL t/lib t/response/TestAPI
Author: jhorwitz
Date: Thu Sep 25 12:21:24 2008
New Revision: 453

Modified:
   mod_parrot/trunk/build/lib/Generator/ApacheConstants.pm
   mod_parrot/trunk/build/lib/Generator/ModParrotConstants.pm
   mod_parrot/trunk/eg/pir/authenhandler.pir
   mod_parrot/trunk/eg/pir/handler.pir
   mod_parrot/trunk/eg/pir/interpinfo.pir
   mod_parrot/trunk/lib/Apache/Constants.pir
   mod_parrot/trunk/lib/ModParrot/Constants.pir
   mod_parrot/trunk/lib/ModParrot/HLL/lolcode.pir
   mod_parrot/trunk/lib/ModParrot/HLL/nqp.pir
   mod_parrot/trunk/lib/ModParrot/HLL/pipp.pir
   mod_parrot/trunk/lib/ModParrot/HLL/pir.pir
   mod_parrot/trunk/t/lib/handlers.pir
   mod_parrot/trunk/t/response/TestAPI/interpreter.pir
   mod_parrot/trunk/t/response/TestAPI/request_rec.pir

Log:
standardize name of constants hash -- use 'table' instead of 'foo_constants'


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	Thu Sep 25 12:21:24 2008
@@ -109,7 +109,7 @@
     my $string = "";
   
     while (my ($k, $v) = each %$constants) {
-        $string .= "    ap_constants[ \"$k\" ] = $v\n";
+        $string .= "    table[ \"$k\" ] = $v\n";
     }
 
     return $string;
@@ -137,9 +137,9 @@
 
 __DATA__
 .sub _init_const_table
-    .local pmc ap_constants
+    .local pmc table
 
-    ap_constants = new 'OrderedHash'
+    table = new 'OrderedHash'
 
     # Handler Responses
 %%HANDLER%%
@@ -153,6 +153,6 @@
     # Apache Config
 %%CONFIG%%
 
-    set_root_global [ 'Apache'; 'Constants' ], 'ap_constants', ap_constants
+    set_root_global [ 'Apache'; 'Constants' ], 'table', table
 .end
 

Modified: mod_parrot/trunk/build/lib/Generator/ModParrotConstants.pm
==============================================================================
--- mod_parrot/trunk/build/lib/Generator/ModParrotConstants.pm	(original)
+++ mod_parrot/trunk/build/lib/Generator/ModParrotConstants.pm	Thu Sep 25 12:21:24 2008
@@ -80,7 +80,7 @@
     my $string = "";
   
     while (my ($k, $v) = each %$constants) {
-        $string .= "    mp_constants[ \"$k\" ] = $v\n";
+        $string .= "    table[ \"$k\" ] = $v\n";
     }
 
     return $string;
@@ -105,13 +105,12 @@
 
 __DATA__
 .sub _init_const_table
-    .local pmc mp_constants
+    .local pmc table
 
-    mp_constants = new 'OrderedHash'
+    table = new 'OrderedHash'
 
-    # mod_parrot config
 %%CONFIG%%
 
-    set_root_global [ 'ModParrot'; 'Constants' ], 'mp_constants', mp_constants
+    set_root_global [ 'ModParrot'; 'Constants' ], 'table', table
 .end
 

Modified: mod_parrot/trunk/eg/pir/authenhandler.pir
==============================================================================
--- mod_parrot/trunk/eg/pir/authenhandler.pir	(original)
+++ mod_parrot/trunk/eg/pir/authenhandler.pir	Thu Sep 25 12:21:24 2008
@@ -25,7 +25,7 @@
     .local string pw
     .local int status
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
 
     $P0 = r.'get_basic_auth_pw'( )
     status = $P0[0]

Modified: mod_parrot/trunk/eg/pir/handler.pir
==============================================================================
--- mod_parrot/trunk/eg/pir/handler.pir	(original)
+++ mod_parrot/trunk/eg/pir/handler.pir	Thu Sep 25 12:21:24 2008
@@ -25,7 +25,7 @@
     r.'puts'($S0)
 
     # tell apache we're finished
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
     $I0 = ap_const['OK']
     .return($I0)
 .end

Modified: mod_parrot/trunk/eg/pir/interpinfo.pir
==============================================================================
--- mod_parrot/trunk/eg/pir/interpinfo.pir	(original)
+++ mod_parrot/trunk/eg/pir/interpinfo.pir	Thu Sep 25 12:21:24 2008
@@ -122,7 +122,7 @@
 
     # tell apache we're finished
     .local pmc ap_const
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
     $I0 = ap_const['OK']
     .return($I0)
 .end

Modified: mod_parrot/trunk/lib/Apache/Constants.pir
==============================================================================
--- mod_parrot/trunk/lib/Apache/Constants.pir	(original)
+++ mod_parrot/trunk/lib/Apache/Constants.pir	Thu Sep 25 12:21:24 2008
@@ -20,14 +20,14 @@
 
 =head1 DESCRIPTION
 
-Defines an ordered hash called C<ap_constants> in the C<Apache::Constants>
+Defines an ordered hash called C<table> in the C<Apache::Constants>
 namespace containing various useful Apache constants.  This includes C<OK>,
 C<DECLINED>, and HTTP status codes you should return from a handler.
 
-This IMC code returns C<OK> from a handler:
+This PIR code returns C<OK> from a handler:
 
- $P0 = get_root_global [ 'Apache'; 'Constants'], 'ap_const'
- $I0 = ap_const['OK']
+ $P0 = get_root_global [ 'Apache'; 'Constants'], 'table'
+ $I0 = $P0['OK']
 
  .return($I0)
 =head1 AUTHOR

Modified: mod_parrot/trunk/lib/ModParrot/Constants.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/Constants.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/Constants.pir	Thu Sep 25 12:21:24 2008
@@ -20,7 +20,7 @@
 
 =head1 DESCRIPTION
 
-Defines an ordered hash called C<mp_constants> in the C<ModParrot::Constants>
+Defines an ordered hash called C<table> in the C<ModParrot::Constants>
 namespace containing various useful mod_parrot constants.
 
 =head1 AUTHOR

Modified: mod_parrot/trunk/lib/ModParrot/HLL/lolcode.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/HLL/lolcode.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/HLL/lolcode.pir	Thu Sep 25 12:21:24 2008
@@ -63,7 +63,7 @@
     .local int status
 
     # get apache constants
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()

Modified: mod_parrot/trunk/lib/ModParrot/HLL/nqp.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/HLL/nqp.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/HLL/nqp.pir	Thu Sep 25 12:21:24 2008
@@ -61,7 +61,7 @@
     .local int registry
 
     # get apache constants
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()

Modified: mod_parrot/trunk/lib/ModParrot/HLL/pipp.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/HLL/pipp.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/HLL/pipp.pir	Thu Sep 25 12:21:24 2008
@@ -66,7 +66,7 @@
     interp.'capture_stdout'(0)
     r.'puts'($S0)
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
     status = ap_const['OK']
 
     .return(status)

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	Thu Sep 25 12:21:24 2008
@@ -83,7 +83,7 @@
     .local pmc ap_const
     .local pmc cmd
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
     
     cmd = new 'Hash'
     $P0 = new 'String'
@@ -167,7 +167,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -213,7 +213,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -251,7 +251,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -289,7 +289,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -328,7 +328,7 @@
     .local pmc pconf, plog, ptemp
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get configs
     get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
@@ -371,7 +371,7 @@
     .local pmc pconf, plog, ptemp
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get configs
     get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
@@ -413,7 +413,7 @@
     .local pmc pconf, plog, ptemp
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get configs
     get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
@@ -451,7 +451,7 @@
     .local pmc pconf, plog, ptemp
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get configs
     get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
@@ -487,7 +487,7 @@
     .local pmc pconf, plog, ptemp
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get configs
     get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
@@ -521,7 +521,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -559,7 +559,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -597,7 +597,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -635,7 +635,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -673,7 +673,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -711,7 +711,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -750,7 +750,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()
@@ -788,7 +788,7 @@
     .local pmc r, handler, cfg, dircfg, get_config, ap_const
     .local int status
 
-    ap_const = get_root_global ['Apache'; 'Constants'], 'ap_constants'
+    ap_const = get_root_global ['Apache'; 'Constants'], 'table'
 
     # get the request_rec object
     r = ctx.'request_rec'()

Modified: mod_parrot/trunk/t/lib/handlers.pir
==============================================================================
--- mod_parrot/trunk/t/lib/handlers.pir	(original)
+++ mod_parrot/trunk/t/lib/handlers.pir	Thu Sep 25 12:21:24 2008
@@ -6,7 +6,7 @@
     .param pmc r
     .local pmc ap_const
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
     $I0 = ap_const['OK']
 
     r.'puts'('Hello World')
@@ -22,7 +22,7 @@
 
     r.'puts'("Access granted.")
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
     $I0 = ap_const['OK']
 
     .return($I0)
@@ -34,7 +34,7 @@
     .param pmc r
     .local pmc ap_const
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
     $I0 = ap_const['OK']
 
     $S0 = r.'args'( )
@@ -60,7 +60,7 @@
 
     $S0 = r.'user'( )
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
 
     if $S0 != 'joeuser' goto auth_failed
     if $S1 != 'password' goto auth_failed
@@ -81,7 +81,7 @@
     .param pmc r
     .local pmc ap_const
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
     $I0 = ap_const['OK']
 
     $S0 = r.'args'( )

Modified: mod_parrot/trunk/t/response/TestAPI/interpreter.pir
==============================================================================
--- mod_parrot/trunk/t/response/TestAPI/interpreter.pir	(original)
+++ mod_parrot/trunk/t/response/TestAPI/interpreter.pir	Thu Sep 25 12:21:24 2008
@@ -7,7 +7,7 @@
     .local pmc mpi, ap_const
     .local string results
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
 
     r.'puts'("1..7\n")
 

Modified: mod_parrot/trunk/t/response/TestAPI/request_rec.pir
==============================================================================
--- mod_parrot/trunk/t/response/TestAPI/request_rec.pir	(original)
+++ mod_parrot/trunk/t/response/TestAPI/request_rec.pir	Thu Sep 25 12:21:24 2008
@@ -7,7 +7,7 @@
     .local pmc ap_const
     .local string results
 
-    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
+    ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
 
     r.'puts'("1..33\n")
 
Navigate in group perl.cvs.mod_parrot at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants