LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: jhorwitz@cvs.perl.org Date: Thu Sep 25 14:22:36 2008 Subject: [svn:mod_parrot] r455 - in mod_parrot/trunk: build/lib/Generator languages/perl6/lib lib lib/APR lib/Apache lib/ModParrot lib/ModParrot/HLL src t/lib
t/response/TestAPI
Author: jhorwitz
Date: Thu Sep 25 13:22:35 2008
New Revision: 455
Modified:
mod_parrot/trunk/build/lib/Generator/ApacheConstants.pm
mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm
mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm
mod_parrot/trunk/lib/APR/Table.pir
mod_parrot/trunk/lib/Apache/Constants.pir
mod_parrot/trunk/lib/Apache/Module.pir
mod_parrot/trunk/lib/Apache/RequestRec.pir
mod_parrot/trunk/lib/ModParrot/Context.pir
mod_parrot/trunk/lib/ModParrot/HLL/lolcode.pir
mod_parrot/trunk/lib/ModParrot/HLL/nqp.pir
mod_parrot/trunk/lib/ModParrot/HLL/perl6.pir
mod_parrot/trunk/lib/ModParrot/HLL/pipp.pir
mod_parrot/trunk/lib/ModParrot/HLL/pir.pir
mod_parrot/trunk/lib/mod_parrot.pir
mod_parrot/trunk/src/mod_parrot.c
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:
move all namespaces under 'ModParrot' to prevent namespace conflicts with HLLs.
we may not need this in the future, but for now i'm playing it safe.
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 13:22:35 2008
@@ -153,6 +153,6 @@
# Apache Config
%%CONFIG%%
- set_root_global [ 'Apache'; 'Constants' ], 'table', table
+ set_root_global [ 'ModParrot'; 'Apache'; 'Constants' ], 'table', table
.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 Thu Sep 25 13:22:35 2008
@@ -70,7 +70,7 @@
{
my $template = <<'END'
dlfunc func, nul, "mpnci_request_rec_%%NAME%%", "%%SIG%%"
-set_root_global [ '_modparrot'; 'NCI' ], "request_rec_%%NAME%%", func
+set_root_global [ 'ModParrot'; 'NCI' ], "request_rec_%%NAME%%", func
END
;
@@ -135,7 +135,7 @@
getattribute r, self, 'r'
- request_rec_%%NAME%% = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_%%NAME%%'
+ request_rec_%%NAME%% = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec_%%NAME%%'
%%NAME%% = request_rec_%%NAME%%( r , data, update_r )
.return(%%NAME%%)
@@ -165,7 +165,7 @@
data = ""
call_it:
- request_rec_%%NAME%% = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_%%NAME%%'
+ request_rec_%%NAME%% = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec_%%NAME%%'
%%NAME%% = request_rec_%%NAME%%( r , data, update_r )
.return(%%NAME%%)
Modified: mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm
==============================================================================
--- mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm (original)
+++ mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm Thu Sep 25 13:22:35 2008
@@ -49,8 +49,8 @@
return -1; # DECLINED
}
- my %cfg = Apache::Module::get_config("modparrot_perl6_module");
- my %dircfg = Apache::Module::get_config("modparrot_perl6_module",
+ my %cfg = ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ my %dircfg = ModParrot::Apache::Module::get_config("modparrot_perl6_module",
$r.per_dir_config());
my $handler = %dircfg{'response_handler'};
@@ -110,7 +110,7 @@
# XXX would be nice to use the enum strings here
my @hooks = (13);
-Apache::Module::add(
+ModParrot::Apache::Module::add(
'modparrot_perl6_module',
'perl6',
@cmds,
Modified: mod_parrot/trunk/lib/APR/Table.pir
==============================================================================
--- mod_parrot/trunk/lib/APR/Table.pir (original)
+++ mod_parrot/trunk/lib/APR/Table.pir Thu Sep 25 13:22:35 2008
@@ -36,7 +36,7 @@
=cut
-.namespace [ 'APR'; 'Table' ]
+.namespace [ 'ModParrot'; 'APR'; 'Table' ]
.sub _initialize :load
.local pmc table_class
@@ -45,7 +45,7 @@
null nul
- newclass table_class, [ 'APR'; 'Table' ]
+ newclass table_class, [ 'ModParrot'; 'APR'; 'Table' ]
addattribute table_class, 'apr_table'
dlfunc func, nul, "apr_table_get", "tpt"
@@ -55,7 +55,7 @@
set_root_global [ 'APR'; 'NCI' ], "apr_table_set", func
.end
-=item C<APR::Table get(STRING key)>
+=item C<ModParrot::APR::Table get(STRING key)>
=over 4
@@ -79,7 +79,7 @@
.return(val)
.end
-=item C<APR::Table set(STRING key, STRING value)>
+=item C<ModParrot::APR::Table set(STRING key, STRING value)>
=over 4
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 13:22:35 2008
@@ -26,7 +26,7 @@
This PIR code returns C<OK> from a handler:
- $P0 = get_root_global [ 'Apache'; 'Constants'], 'table'
+ $P0 = get_root_global [ 'ModParrot'; 'Apache'; 'Constants'], 'table'
$I0 = $P0['OK']
.return($I0)
@@ -36,7 +36,7 @@
=cut
-.namespace [ 'Apache'; 'Constants' ]
+.namespace [ 'ModParrot'; 'Apache'; 'Constants' ]
.include 'build/src/pir/ap_constants.pir'
Modified: mod_parrot/trunk/lib/Apache/Module.pir
==============================================================================
--- mod_parrot/trunk/lib/Apache/Module.pir (original)
+++ mod_parrot/trunk/lib/Apache/Module.pir Thu Sep 25 13:22:35 2008
@@ -24,7 +24,7 @@
=cut
-.namespace [ 'Apache'; 'Module' ]
+.namespace [ 'ModParrot'; 'Apache'; 'Module' ]
.sub _initialize :load
.local pmc module_class
@@ -34,12 +34,13 @@
null nul
dlfunc func, nul, "mpnci_add_apache_module", "pJttPP"
- set_root_global [ '_modparrot'; 'NCI' ], "add_apache_module", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "add_apache_module", func
dlfunc func, nul, "mpnci_get_module_config", "PJtpi"
- set_root_global [ '_modparrot'; 'NCI' ], "get_module_config", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "get_module_config", func
- newclass module_class, [ 'Apache'; 'Module' ]
+ # XXX do we even use this?
+ newclass module_class, [ 'ModParrot'; 'Apache'; 'Module' ]
addattribute module_class, 'module'
.end
@@ -136,7 +137,7 @@
.param pmc hooks
.local pmc add_module
- add_module = get_root_global ['_modparrot'; 'NCI' ], "add_apache_module"
+ add_module = get_root_global ['ModParrot'; 'NCI' ], "add_apache_module"
add_module(name, namespace, cmds, hooks)
.end
@@ -158,7 +159,7 @@
.param int is_directory :opt_flag
.local pmc config, get_conf
- get_conf = get_root_global ['_modparrot'; 'NCI' ], "get_module_config"
+ get_conf = get_root_global ['ModParrot'; 'NCI' ], "get_module_config"
config = get_conf(name, per_dir_config, is_directory)
.return(config)
Modified: mod_parrot/trunk/lib/Apache/RequestRec.pir
==============================================================================
--- mod_parrot/trunk/lib/Apache/RequestRec.pir (original)
+++ mod_parrot/trunk/lib/Apache/RequestRec.pir Thu Sep 25 13:22:35 2008
@@ -22,16 +22,16 @@
.local pmc r
- r = new [ 'Apache'; 'RequestRec' ]
+ r = new [ 'ModParrot'; 'Apache'; 'RequestRec' ]
r.'content_type'("text/html")
r.'puts'("Hello world")
=head1 DESCRIPTION
-This code implements the Apache::RequestRec class, an encapsulation of Apache's
-request_rec structure. It is modeled after mod_perl's Apache::RequestRec
-class, but is in no way tied to mod_perl.
+This code implements the ModParrot;Apache;RequestRec class, an encapsulation of
+Apache's request_rec structure. It is modeled after mod_perl's
+Apache::RequestRec class, but is in no way tied to mod_perl.
=head2 Methods
@@ -39,7 +39,7 @@
=cut
-.namespace [ 'Apache'; 'RequestRec' ]
+.namespace [ 'ModParrot'; 'Apache'; 'RequestRec' ]
.sub _initialize :load
.local pmc rr_class
@@ -48,7 +48,7 @@
null nul
- newclass rr_class, [ 'Apache'; 'RequestRec' ]
+ newclass rr_class, [ 'ModParrot'; 'Apache'; 'RequestRec' ]
addattribute rr_class, 'r'
addattribute rr_class, 'pmc_notes'
@@ -79,7 +79,7 @@
.local pmc r
.local pmc pmc_notes
- request_rec = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec'
+ request_rec = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec'
r = request_rec( )
setattribute self, 'r', r
@@ -156,7 +156,7 @@
.local int bytes
getattribute r, self, 'r'
- ap_rwrite = get_root_global [ '_modparrot'; 'NCI' ], 'rwrite'
+ ap_rwrite = get_root_global [ 'ModParrot'; 'NCI' ], 'rwrite'
bytes = ap_rwrite( data, size, r )
.return(bytes)
@@ -180,7 +180,7 @@
.local string filename
getattribute r, self, 'r'
- request_rec_filename = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_filename'
+ request_rec_filename = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec_filename'
if update_r == 1 goto CALL_NCI
f = ""
@@ -197,8 +197,8 @@
Send a log to Apache's error log. C<file> and C<line> are the file and line
number where the logging event occured, and should be set by the targeting
language. C<level> is one of the Apache log levels, which can be found in
-Apache::Constants (with the C<APLOG_> prefix). C<data> is the actual log
-message to be written into the error log.
+ModParrot;Apache;Constants (with the C<APLOG_> prefix). C<data> is the actual
+log message to be written into the error log.
=back
@@ -213,7 +213,7 @@
.local pmc ap_log_rerror
getattribute r, self, 'r'
- ap_log_rerror = get_root_global [ '_modparrot'; 'NCI' ], 'ap_log_rerror'
+ ap_log_rerror = get_root_global [ 'ModParrot'; 'NCI' ], 'ap_log_rerror'
ap_log_rerror( file, line, level, 0, r, msg )
.end
@@ -237,7 +237,7 @@
.local pmc results
getattribute r, self, 'r'
- request_rec_get_basic_auth_pw = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_get_basic_auth_pw'
+ request_rec_get_basic_auth_pw = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec_get_basic_auth_pw'
results = new 'Array'
results = 2
@@ -338,7 +338,7 @@
=over 4
-Returns the request's notes table as an APR::Table object.
+Returns the request's notes table as an ModParrot;APR;Table object.
=back
@@ -352,10 +352,10 @@
getattribute r, self, 'r'
- request_rec_notes = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_notes'
+ request_rec_notes = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec_notes'
notes = request_rec_notes( r )
- $P0 = get_class [ 'APR'; 'Table' ]
+ $P0 = get_class [ 'ModParrot'; 'APR'; 'Table' ]
$P1 = new 'Hash'
$P1['apr_table'] = notes
t = new $P0, $P1
@@ -380,7 +380,7 @@
getattribute r, self, 'r'
- request_rec_main = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_main'
+ request_rec_main = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec_main'
main_r = request_rec_main( r )
.return(main_r)
@@ -403,7 +403,7 @@
getattribute r, self, 'r'
- request_rec_next = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_next'
+ request_rec_next = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec_next'
next_r = request_rec_next( r )
.return(next_r)
@@ -426,8 +426,8 @@
getattribute r, self, 'r'
- request_rec_prev = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_prev'
- $P0 = get_class [ 'Apache'; 'RequestRec' ]
+ request_rec_prev = get_root_global [ 'ModParrot'; 'NCI' ], 'request_rec_prev'
+ $P0 = get_class [ 'ModParrot'; 'Apache'; 'RequestRec' ]
$P1 = request_rec_prev( r )
$P2 = new 'Hash'
$P2['r'] = $P1
@@ -507,7 +507,7 @@
.local pmc get_config
.local pmc r
- get_config = get_root_global ['_modparrot'; 'NCI'], 'request_rec_per_dir_config'
+ get_config = get_root_global ['ModParrot'; 'NCI'], 'request_rec_per_dir_config'
getattribute r, self, 'r'
dircfg = get_config(r)
Modified: mod_parrot/trunk/lib/ModParrot/Context.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/Context.pir (original)
+++ mod_parrot/trunk/lib/ModParrot/Context.pir Thu Sep 25 13:22:35 2008
@@ -73,7 +73,7 @@
.sub request_rec :method
.local pmc r
- $P0 = new [ 'Apache'; 'RequestRec' ]
+ $P0 = new [ 'ModParrot'; 'Apache'; 'RequestRec' ]
.return($P0)
.end
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 13:22:35 2008
@@ -63,7 +63,7 @@
.local int status
# get apache constants
- ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; '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 13:22:35 2008
@@ -61,7 +61,7 @@
.local int registry
# get apache constants
- ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; 'Apache'; 'Constants' ], 'table'
# get the request_rec object
r = ctx.'request_rec'()
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 Thu Sep 25 13:22:35 2008
@@ -24,18 +24,20 @@
$P0 = new 'Env'
$S0 = $P0['PERL6LIB']
- find_file_in_path = get_hll_global ['_modparrot'], 'find_file_in_path'
+ find_file_in_path = get_hll_global ['ModParrot'], 'find_file_in_path'
mp6_path = find_file_in_path($S0, 'mod_perl6.pm')
$P0 = compreg 'Perl6'
$P1 = $P0.'evalfiles'(mp6_path)
# register mod_parrot classes as Perl6 meta classes so Perl 6 can access
- # them natively
+ # them natively. use 'name' to register the class under a different
+ # name, letting mod_parrot provide scaffolding for functionality not yet
+ # available in the HLL layer.
$P0 = get_hll_global 'P6metaclass'
- $P1 = get_class ['Apache'; 'RequestRec']
- $P0.'register'($P1)
- $P1 = get_class ['APR'; 'Table']
- $P0.'register'($P1)
+ $P1 = get_class ['ModParrot'; 'Apache'; 'RequestRec']
+ $P0.'register'($P1, 'name' => 'Apache;RequestRec')
+ $P1 = get_class ['ModParrot';'APR'; 'Table']
+ $P0.'register'($P1, 'name' => 'APR;Table')
$P1 = get_class ['ModParrot'; 'Interpreter']
$P0.'register'($P1)
$P1 = get_class ['ModParrot'; 'Context']
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 13:22:35 2008
@@ -66,7 +66,7 @@
interp.'capture_stdout'(0)
r.'puts'($S0)
- ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; '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 13:22:35 2008
@@ -70,7 +70,7 @@
inc $I0
if $I0 < 19 goto loop_start
- add_module = get_hll_global [ 'Apache'; 'Module' ], 'add'
+ add_module = get_hll_global [ 'ModParrot'; 'Apache'; 'Module' ], 'add'
$P1 = add_module("modparrot_pir_module", "PIR", cmds, hooks)
.end
@@ -83,7 +83,7 @@
.local pmc ap_const
.local pmc cmd
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; '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'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
@@ -179,7 +179,7 @@
goto return_status
get_configs:
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -213,13 +213,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -251,13 +251,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -289,13 +289,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -328,10 +328,10 @@
.local pmc pconf, plog, ptemp
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
# decline if we have no handler in this section
@@ -347,15 +347,15 @@
# get the pool objects
# XXX need access to these from the context!
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'conf_pool'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'conf_pool'
pconf = $P0()
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'log_pool'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'log_pool'
plog = $P0()
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'temp_pool'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'temp_pool'
ptemp = $P0()
# get the server_rec object
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'server_rec'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'server_rec'
s = $P0()
status = handler(pconf, plog, ptemp, s)
@@ -371,10 +371,10 @@
.local pmc pconf, plog, ptemp
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
# decline if we have no handler in this section
@@ -389,15 +389,15 @@
# get the pool objects
# XXX need access to these from the context!
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'conf_pool'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'conf_pool'
pconf = $P0()
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'log_pool'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'log_pool'
plog = $P0()
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'temp_pool'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'temp_pool'
ptemp = $P0()
# get the server_rec object
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'server_rec'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'server_rec'
s = $P0()
status = handler(pconf, plog, ptemp, s)
@@ -413,10 +413,10 @@
.local pmc pconf, plog, ptemp
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
# decline if we have no handler in this section
@@ -431,11 +431,11 @@
# get the pool objects
# XXX need access to these from the context!
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'child_pool'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'child_pool'
pchild = $P0()
# get the server_rec object
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'server_rec'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'server_rec'
s = $P0()
status = handler(pchild, s)
@@ -451,10 +451,10 @@
.local pmc pconf, plog, ptemp
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
# decline if we have no handler in this section
@@ -469,9 +469,9 @@
# get the pool objects
# XXX need access to these from the context!
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'conn_rec'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'conn_rec'
c = $P0()
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'csd'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'csd'
csd = $P0()
status = handler(c, csd)
@@ -487,10 +487,10 @@
.local pmc pconf, plog, ptemp
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
# decline if we have no handler in this section
@@ -505,7 +505,7 @@
# get the pool objects
# XXX need access to these from the context!
- $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'conn_rec'
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'conn_rec'
c = $P0()
status = handler(c)
@@ -521,13 +521,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -559,13 +559,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -597,13 +597,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -635,13 +635,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -673,13 +673,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -711,13 +711,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -750,13 +750,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
@@ -788,13 +788,13 @@
.local pmc r, handler, cfg, dircfg, get_config, ap_const
.local int status
- ap_const = get_root_global ['Apache'; 'Constants'], 'table'
+ ap_const = get_root_global ['ModParrot'; 'Apache'; 'Constants'], 'table'
# get the request_rec object
r = ctx.'request_rec'()
# get configs
- get_config = get_hll_global ['Apache'; 'Module'], 'get_config'
+ get_config = get_hll_global ['ModParrot'; 'Apache'; 'Module'], 'get_config'
cfg = get_config('modparrot_pir_module')
$P0 = r.'per_dir_config'()
dircfg = get_config('modparrot_pir_module', $P0)
Modified: mod_parrot/trunk/lib/mod_parrot.pir
==============================================================================
--- mod_parrot/trunk/lib/mod_parrot.pir (original)
+++ mod_parrot/trunk/lib/mod_parrot.pir Thu Sep 25 13:22:35 2008
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-.namespace [ '_modparrot' ]
+.namespace [ 'ModParrot' ]
.include 'iglobals.pasm'
@@ -28,58 +28,58 @@
.include "build/src/pir/request_rec_dlfunc.pir"
dlfunc func, nul, "mpnci_backtrace", "tJ"
- set_root_global [ '_modparrot'; 'NCI' ], "backtrace", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "backtrace", func
dlfunc func, nul, "mpnci_request_rec", "pJ"
- set_root_global [ '_modparrot'; 'NCI' ], "request_rec", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "request_rec", func
dlfunc func, nul, "mpnci_request_rec_main", "pJp"
- set_root_global [ '_modparrot'; 'NCI' ], "request_rec_main", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "request_rec_main", func
dlfunc func, nul, "mpnci_request_rec_next", "pJp"
- set_root_global [ '_modparrot'; 'NCI' ], "request_rec_next", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "request_rec_next", func
dlfunc func, nul, "mpnci_request_rec_prev", "pJp"
- set_root_global [ '_modparrot'; 'NCI' ], "request_rec_prev", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "request_rec_prev", func
dlfunc func, nul, "mpnci_request_rec_user", "tJpti"
- set_root_global [ '_modparrot'; 'NCI' ], "request_rec_user", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "request_rec_user", func
dlfunc func, nul, "mpnci_request_rec_notes", "pJp"
- set_root_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"
- set_root_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_request_rec_per_dir_config", "pJp"
- set_root_global [ '_modparrot'; 'NCI' ], "request_rec_per_dir_config", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "request_rec_per_dir_config", func
dlfunc func, nul, "mpnci_rwrite", "iJPip"
- set_root_global [ '_modparrot'; 'NCI' ], "rwrite", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "rwrite", func
dlfunc func, nul, "mpnci_ap_log_rerror", "vJtiiipt"
- set_root_global [ '_modparrot'; 'NCI' ], "ap_log_rerror", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "ap_log_rerror", func
dlfunc func, nul, "mpnci_conf_pool", "pJ"
- set_root_global [ '_modparrot'; 'NCI' ], "conf_pool", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "conf_pool", func
dlfunc func, nul, "mpnci_temp_pool", "pJ"
- set_root_global [ '_modparrot'; 'NCI' ], "temp_pool", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "temp_pool", func
dlfunc func, nul, "mpnci_log_pool", "pJ"
- set_root_global [ '_modparrot'; 'NCI' ], "log_pool", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "log_pool", func
dlfunc func, nul, "mpnci_child_pool", "pJ"
- set_root_global [ '_modparrot'; 'NCI' ], "child_pool", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "child_pool", func
dlfunc func, nul, "mpnci_server_rec", "pJ"
- set_root_global [ '_modparrot'; 'NCI' ], "server_rec", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "server_rec", func
dlfunc func, nul, "mpnci_conn_rec", "pJ"
- set_root_global [ '_modparrot'; 'NCI' ], "conn_rec", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "conn_rec", func
dlfunc func, nul, "mpnci_csd", "pJ"
- set_root_global [ '_modparrot'; 'NCI' ], "csd", func
+ set_root_global [ 'ModParrot'; 'NCI' ], "csd", func
# load required libraries
load_bytecode 'Protoobject.pbc'
Modified: mod_parrot/trunk/src/mod_parrot.c
==============================================================================
--- mod_parrot/trunk/src/mod_parrot.c (original)
+++ mod_parrot/trunk/src/mod_parrot.c Thu Sep 25 13:22:35 2008
@@ -100,12 +100,12 @@
/* set additional include paths from apache config */
if (cfg->include_path) {
- modparrot_call_sub_IS(interp, "_modparrot",
+ modparrot_call_sub_IS(interp, "ModParrot",
"modparrot_set_include_path", &i, cfg->include_path);
}
/* initialize parrot side */
- modparrot_call_sub(interp, "_modparrot", "modparrot_init");
+ modparrot_call_sub(interp, "ModParrot", "modparrot_init");
/* set our context
* Since there is a one-to-one relationship between threads and
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 13:22:35 2008
@@ -6,7 +6,7 @@
.param pmc r
.local pmc ap_const
- ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; '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' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; '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' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; 'Apache'; 'Constants' ], 'table'
$I0 = ap_const['OK']
$S0 = r.'args'( )
@@ -60,7 +60,7 @@
$S0 = r.'user'( )
- ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; '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' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; '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 13:22:35 2008
@@ -7,7 +7,7 @@
.local pmc mpi, ap_const
.local string results
- ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; '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 13:22:35 2008
@@ -7,14 +7,14 @@
.local pmc ap_const
.local string results
- ap_const = get_root_global [ 'Apache'; 'Constants' ], 'table'
+ ap_const = get_root_global [ 'ModParrot'; 'Apache'; 'Constants' ], 'table'
r.'puts'("1..33\n")
# XXX this should be fatal on failure
START_1:
$S0 = typeof r
- if $S0 == "Apache;RequestRec" goto OK_1
+ if $S0 == "ModParrot;Apache;RequestRec" goto OK_1
NOT_OK_1:
r.'puts'("not ")
OK_1:
| 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 |