On Sep 6, 2006, at 18:19, Philip M. Gollucci wrote:
Also see:
./hooks/TestHooks/push_handlers_same_phase.pm
Its the closest test we have -- maybe extend or duplicate and tweak
to test this and provide an example ?
Maybe something like this?
Index: t/hooks/TestHooks/push_handlers_same_phase.pm
===================================================================
--- t/hooks/TestHooks/push_handlers_same_phase.pm (revision 105875)
+++ t/hooks/TestHooks/push_handlers_same_phase.pm (working copy)
@@ -24,8 +24,14 @@
my $counter = $r->notes->get('counter') || 0;
$r->notes->set(counter => $counter+1);
+ ok ! $r->get_handlers('PerlResponseHandler'),
+ 'There should not yet be a PerlResponseHandler';
+
$r->push_handlers(PerlResponseHandler => \&real_response);
+ ok $r->get_handlers('PerlResponseHandler'),
+ 'Not there should be a PerlResponseHandler';
+
return Apache::DECLINED;
}
Then just have whatever test script sends the request send it twice.
But I was asking about mod_perl1, actually. :-)
Best,
David