RE: CGI::Utils->getSelfRefUrlWithQuery() not working inside mod_perl?
Desilets, Alain <Alain.Desilets <at> nrc-cnrc.gc.ca>
2011-12-01 22:36:24 GMT
BTW, according to the doc for CGI::Utils->new(), the constructor works in mod_perl provided that the
Apache request object is passed as argument, or can be retrieved via Apache->request or Apache2::RequestUtil->request.
So, I updated my script to verify that Apache2::RequestUtil->request does indeed return a valid request.
When I print the returned instance, it says:
which indicates that it is indeed a scalar that is blessed into the RequestRec class.
From: Desilets, Alain
Sent: Thursday, December 01, 2011 5:16 PM
To: modperl <at> perl.apache.org
Subject: CGI::Utils->getSelfRefUrlWithQuery() not working inside mod_perl?
Trying to migrate a complex script from a standard CGI context to a mod_perl context, and am having a hell of a
time. The latest problem is that I have a call to GCI::Utils->getSelfRefUrlWithQuery() which causes a crash.
In an attempt to isolate the problem, I wrote this short script which does nothing more than call that method:
print "Content-type: text/plain\r\n\r\n";
my $self_url = '';
print "Before calling get_self_ref_url_with_query()\n";
my $cgi_utils = CGI::Utils->new();