Subject: | Require 'require Apache2::Response;' |
This is the error:
Can't locate object method "send_cgi_header" via package
"Apache2::RequestRec" at /usr/local/share/perl/5.10.0/CGI/Simple.pm line
1011.
I'm using:
Server Version: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8g
mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
and in my module:
package Local::Sites::Test::Sites;
# Author:
# Ron Savage <ron@savage.net.au>
use base 'CGI::Application';
use strict;
use warnings FATAL => 'all', NONFATAL => 'redefine';
use CGI::Simple;
use Local::Sites::Config;
use Local::Sites::Base::DB;
use Log::Dispatch;
use Log::Dispatch::DBI;
our $VERSION = '1.00';
# -----------------------------------------------
sub cgiapp_get_query
{
my($self) = @_;
return CGI::Simple -> new();
} # End of cgiapp_get_query.
I found I needed to add:
require Apache2::Response;
as the new line 1010 to get my code to work.
I'm guessing Apache::RequestUtil does not export or even contain the
method send_cgi_header() without adding this line.