It may have been a problem before, as in the early versions of mod_perl2 there were a lot of missing functions, but send_cgi_header is there now.
cees@tim:~$ perl -MApache2 -MModPerl::MethodLookup -e print_method sen
+d_cgi_header
To use method 'send_cgi_header' add:
use Apache::Response ();
So it is definately available now. However, I just checked through the CGI.pm source and can't find any place where it loads Apache::Response. So there is a possibility that is won't work without that. And a quick check shows that it doesn't get brought in by any other Apache2 modules that CGI.pm does load...
tim:~# MOD_PERL=1 perl -MApache2 -MCGI -e '$,=$/;print sort keys %INC;
+'
APR/Pool.pm
APR/XSLoader.pm
Apache/RequestRec.pm
Apache/RequestUtil.pm
Apache/XSLoader.pm
Apache2.pm
...
The reasons Apache::compat fixes the problem is because it automatically loads Apache::Response which makes cgi_send_header available again.
So short of writing a bit of code that uses CGI.pm's header function under mod_perl2 and actually testing it, I guess you might be right... It might be best to ask this on the mod_perl list.
Update: I wrote a quick script using the sample script at the top of the CGI.pm docs and ran it under mod_perl 1.99_11 successfully. So I guess we can let this worry to rest :)
-Cees |