[svn:mod_parrot] r547 - mod_parrot/trunk/languages/perl6/lib
[email protected] Sat, 13 Dec 2008 08:00:25 -0800 (PST)
| Newsgroups | perl.cvs.mod_parrot |
|---|---|
| Message-ID | <[email protected]> |
Author: jhorwitz
Date: Sat Dec 13 08:00:25 2008
New Revision: 547
Modified:
mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm
Log:
grab pool objects from context
register Perl6PostConfigHandler command
add remaining command handlers (they still need to be registered though)
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 Sat Dec 13 08:00:25 2008
@@ -202,10 +202,14 @@
sub post_config_handler($ctx)
{
- #my $conf_pool = $ctx.conf_pool();
- #my $log_pool = $ctx.log_pool();
- #my $temp_pool = $ctx.temp_pool();
+ my $conf_pool = $ctx.conf_pool();
+ my $log_pool = $ctx.log_pool();
+ my $temp_pool = $ctx.temp_pool();
+
+ # XXX uncomment when server_rec is implemented
#my $s = $ctx.server_rec();
+ my $s = undef;
+
my %cfg = ModParrot::Apache::Module::get_config("modparrot_perl6_module");
# preload modules
@@ -225,8 +229,7 @@
}
# run the postconfig handler
- #my $status = ::($handler)::handler($conf_pool, $log_pool, $temp_pool, $s);
- my $status = call_handler($handler);
+ my $status = call_handler($handler, $conf_pool, $log_pool, $temp_pool, $s);
return $status;
}
@@ -236,15 +239,98 @@
return $status;
}
-sub cmd_perl6responsehandler(%dircfg, @args)
+sub cmd_perl6openlogshandler(%mconfig, @args)
{
- %dircfg<response_handler> = @args[0];
+ my %cfg := ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ %cfg<open_logs_handler> = @args[0];
+}
+
+sub cmd_perl6postconfighandler(%mconfig, @args)
+{
+ my %cfg := ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ %cfg<post_config_handler> = @args[0];
+}
+
+sub cmd_perl6childinithandler(%mconfig, @args)
+{
+ my %cfg := ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ %cfg<child_init_handler> = @args[0];
+}
+
+sub cmd_perl6preconnectionhandler(%mconfig, @args)
+{
+ my %cfg := ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ %cfg<pre_connection_handler> = @args[0];
+}
+
+sub cmd_perl6processconnectionhandler(%mconfig, @args)
+{
+ my %cfg := ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ %cfg<process_connection_handler> = @args[0];
+}
+
+sub cmd_perl6postreadrequesthandler(%mconfig, @args)
+{
+ my %cfg := ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ %cfg<post_read_request_handler> = @args[0];
+}
+
+sub cmd_perl6maptostoragehandler(%mconfig, @args)
+{
+ my %cfg := ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ %cfg<map_to_storage_handler> = @args[0];
+}
+
+sub cmd_perl6transhandler(%mconfig, @args)
+{
+ my %cfg := ModParrot::Apache::Module::get_config("modparrot_perl6_module");
+ %cfg<trans_handler> = @args[0];
}
sub cmd_perl6headerparserhandler(%dircfg, @args)
{
%dircfg<header_parser_handler> = @args[0];
-}
+}
+
+sub cmd_perl6accesshandler(%dircfg, @args)
+{
+ %dircfg<access_handler> = @args[0];
+}
+
+sub cmd_perl6authenhandler(%dircfg, @args)
+{
+ %dircfg<authen_handler> = @args[0];
+}
+
+sub cmd_perl6authzhandler(%dircfg, @args)
+{
+ %dircfg<authz_handler> = @args[0];
+}
+
+sub cmd_perl6responsehandler(%dircfg, @args)
+{
+ %dircfg<response_handler> = @args[0];
+}
+
+sub cmd_perl6typehandler(%dircfg, @args)
+{
+ %dircfg<type_handler> = @args[0];
+}
+
+sub cmd_perl6fixuphandler(%dircfg, @args)
+{
+ %dircfg<fixup_handler> = @args[0];
+}
+
+sub cmd_perl6loghandler(%dircfg, @args)
+{
+ %dircfg<log_handler> = @args[0];
+}
+
+sub cmd_perl6cleanuphandler(%dircfg, @args)
+{
+ %dircfg<cleanup_handler> = @args[0];
+}
sub cmd_perl6cleanuphandler(%dircfg, @args)
{
@@ -292,6 +378,13 @@
'errmsg' => 'usage: Perl6Module module'
},
{
+ 'name' => 'Perl6PostConfigHandler',
+ 'args_how' => $Apache::Const::TAKE1,
+ 'func' => &cmd_perl6postconfighandler,
+ 'req_override' => $Apache::Const::RSRC_CONF,
+ 'errmsg' => 'usage: Perl6PostConfigHandler handler-name'
+ },
+ {
'name' => 'Perl6ResponseHandler',
'args_how' => $Apache::Const::TAKE1,
'func' => &cmd_perl6responsehandler,