Hi,

I am trying to redirect in mod perl. Here's my code:

package Test;
use strict;
my $location = 'http://.....';
use Apache::Constants qw(REDIRECT OK);
my $r = shift;
my $cookie = ....;
$r->err_headers_out->add('Set-Cookie' => $cookie);
$r->headers_out(Location => $location);
$r->status(REDIRECT);
$r->send_http_header;
return OK;

... why does this return the following error:
Usage: Apache::headers_out(r) at modules/Test.pm line 8.

Anyone had this before or know what I'm doing wrong?

Thanks

andy


Reply via email to