Geoffrey Young wrote:
hi all
I'm starting to work on this again (for the complete thread, in case it's not fresh in your mind, see http://marc.theaimsgroup.com/?t=105431745200001&r=1&w=2)
anyway, I'm working through an implementation that uses modperl_hook_t. as I'm going through it, the patch is getting bigger and bigger
ok, the changes required for this route were massive, and after spending a few days on it, it just didn't work out.
so, I'm back to my original plan. remembering from the past thread that this implementation
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105431735200617&w=2
was preferred over this one
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105458568726732&w=2
here is a new patch.
sure, we can fix the internals later. what's important is to get the functionality right asap.
the only issue outstanding is with filter and ignoring the return status:
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105462573626731&w=2
I think I'm of the opinion that we should keep the current behavior (respecting return values for filters) until assert() works properly. in either case, I'd like to patch that separately to reduce all-at-once changes - this code works for everything that calls modperl_callback_run_handlers, which is everything except filters.
This behavior should also be documented in the normal docs, including the change for stacked handlers in the response phase in the compat doc.
oh, and the docs list PerlChildExitHandler as being of type RUN_ALL when actually it's coded as a VOID (the status is never checked) so I'll fix the docs there too once this is over.
Good.
Also please verify indentation, I have spotted at least a few files with probs, see below, but probably there are more.
[...]Index: lib/ModPerl/Code.pm =================================================================== RCS file: /home/cvspublic/modperl-2.0/lib/ModPerl/Code.pm,v retrieving revision 1.100 diff -u -r1.100 Code.pm --- lib/ModPerl/Code.pm 20 May 2003 01:31:49 -0000 1.100 +++ lib/ModPerl/Code.pm 7 Aug 2003 17:11:09 -0000 @@ -37,27 +37,32 @@
sub canon_args {
my $args = shift->{args};
- my @in = map { "$_->{type} *$_->{name}" } @$args;
my @pass = map { $_->{name} } @$args;
+ my @in;
+ foreach my $href (@$args) {
+ push @in, "$href->{type} *$href->{name}"
+ unless $href->{type} eq 'dummy';
+ }
return wantarray ? ([EMAIL PROTECTED], [EMAIL PROTECTED]) : [EMAIL PROTECTED];
}
indent 4 please.
[...]Index: src/modules/perl/modperl_filter.c =================================================================== RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_filter.c,v retrieving revision 1.64 diff -u -r1.64 modperl_filter.c --- src/modules/perl/modperl_filter.c 13 May 2003 09:18:58 -0000 1.64 +++ src/modules/perl/modperl_filter.c 7 Aug 2003 17:11:14 -0000
@@ -384,6 +385,7 @@
av_push(args, newSViv(filter->readbytes));
}
+ /* filters are VOID handlers. should we ignore the status? */
probably put XXX, so we know it may need to be fixed.
--- /dev/null 2003-01-30 05:24:37.000000000 -0500 +++ t/hooks/TestHooks/stacked_handlers2.pm 2003-08-07 12:57:11.000000000 -0400
again, indent 4 please
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
