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


In reply to Re: Re: Re: Re: Apache2 Frustrations by cees
in thread Apache2 Frustrations by dragonchild

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.