On Wed, Jun 20, 2001 at 10:42:31AM -0400, Andy Williams wrote:
> 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?

According to Apache(3), there are two methods, headers_out() and
header_out().  I suspect you want the latter.

-Dom

-- 
| Semantico: creators of major online resources          |
|       URL: http://www.semantico.com/                   |
|       Tel: +44 (1273) 722222                           |
|   Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |

Reply via email to