You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Darryl Miles <da...@netbauds.net> on 2006/06/12 16:07:56 UTC
Apache2::compat lacks $request->cgi_header_out() ?
Apache2::compat lacks $request->cgi_header_out() ?
I'm trying to get some mod_perl 1.x code working under mod_perl 2.0.2,
but I get the error:
Can't locate object method "cgi_header_out" via package
"Apache2::RequestRec"
For my usage:
my($header) = 'Location';
my($value) = 'http://domain.com/foo';
$request($header => $value);
Is there any compliant way to make the code work with both MP1 and MP2
? Even if I have to add an ugly conditional:
if($ENV{MOD_PERL} =~ /mod_perl\/2\./) {
# Place MP2 code here
} else {
$request($header => $value);
}
Thanks
Darryl
Re: Apache2::compat lacks $request->cgi_header_out() ?
Posted by Hendrik Van Belleghem <he...@gmail.com>.
Hey,
I posted some notes on my blog about writing an abstraction layer:
http://use.perl.org/~Beatnik/journal/29527
http://use.perl.org/~Beatnik/journal/29346
HTH
Hendrik
On 6/12/06, Darryl Miles <da...@netbauds.net> wrote:
>
> Apache2::compat lacks $request->cgi_header_out() ?
>
> I'm trying to get some mod_perl 1.x code working under mod_perl 2.0.2,
> but I get the error:
>
> Can't locate object method "cgi_header_out" via package
> "Apache2::RequestRec"
>
>
> For my usage:
>
> my($header) = 'Location';
> my($value) = 'http://domain.com/foo';
> $request($header => $value);
>
>
> Is there any compliant way to make the code work with both MP1 and MP2
> ? Even if I have to add an ugly conditional:
>
> if($ENV{MOD_PERL} =~ /mod_perl\/2\./) {
> # Place MP2 code here
> } else {
> $request($header => $value);
> }
>
>
> Thanks
>
> Darryl
>
>