perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Chamas <>
Subject [mp2] $r->current_callback please
Date Wed, 07 May 2003 20:44:57 GMT

I was wondering if we could get $r->current_callback into the standard mp2 API.
It will just be one less thing to worry about when making things work across
mp2 & mp1.

Currently, this is implemented in Apache::compat with a call to
Apache::current_callback, but I was wondering if this could be made
standard for $r, maybe in addition to Apache::current_callback() working ...

I have code in Apache::ASP that I am working on that is looking like:

	my $current_callback = eval { $r->current_callback } || eval { Apache::current_callback()
	if($current_callback) {
	    $request_binary_read = ($current_callback =~ /^Perl(Response)?Handler$/) ? 1 : 0;
	} else {
	    $request_binary_read = 1;
Like other environments I am sure, Apache::ASP runs in at least 3 modes,
which is why this coding gets hairy... so far its running in mp1, mp2, & mod_cgi.
I have a CGI $r emulator, but it ends up looking more like mp1 than mp2.



Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.      
NodeWorks Link Checking      

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message