You'll find a few other issues with AuthCookie and mod_perl-1.9.9_01
beyond the REDIRECT constant. Here's a quick summary:
1) move all the $r->connection->user() calls to $r->user() calls
2) change all the err_header_out() calls to err_headers_out() calls.
< $r->err_headers_out->{'Pragma'} = "no-cache";
---
> $r->err_header_out("Pragma" => "no-cache");
This is the bulk of the changes that I did to get things going. I'm
going to send my in to the maintainer of the Module as soon as I
get some help with method handles. This module makes use of
the technique of derived method handlers. I have been able to get
a regular, much less a derived, method handler working in mod_perl1.99.
As a temporary hack I hacked the module code to be a non-method handler.
good luck,
-pete
Stas Bekman wrote:
> Jie Gao wrote:
> > Hi all,
> >
> > I've been trying to get httpd-2.0.35 + mod_perl-1.99_01 work with backward
> > compatibility.
> >
> > MY startupl.pl:
> >
> > #! /usr/bin/perl
> > use lib '/usr/lib/perl5/site_perl/5.6.1/i386-linux/Apache2';
> > use strict;
> > use Apache::compat ();
> > use Apache2 ();
> > use My::AuthCookieHandler;
> > 1;
> >
> > and this script won't run to finish with the error:
> >
> > unknown group `response' at /usr/lib/perl5/site_perl/5.6.1/My/AuthCookieHandler.pm
>line 6.
> > BEGIN failed--compilation aborted at
>/usr/lib/perl5/site_perl/5.6.1/My/AuthCookieHandler.pm line 6.
> > Compilation failed in require at ./startup.pl line 6.
> > BEGIN failed--compilation aborted at ./startup.pl line 6.
> >
> > And this is the line in question:
> >
> > use Apache::Constants qw(:common :response M_GET M_POST AUTH_REQUIRED REDIRECT);
> >
> > If I take out response, it croaks at "REDIRECT".
> >
> > Any ideas why?
>
> Yes, it's not fully compatible :( in 2.0 we take all the Constants from
> APR and Apache, and they have changed. I guess we can manually do the
> adjustments in compat.pm. Currently there is no group :response in
> Apache::Const, these mainly reside in the new group :http and all the
> codes start with HTTP_
>
> For now try to replace
> REDIRECT with HTTP_TEMPORARY_REDIRECT
> and whatever constants you need from :response by looking them up in
> xs/ModPerl/Const/modperl_constants.c (which is autogenerated when you
> build mod_perl).
>
> We will discuss this issue at the dev list and the compat docs will be
> updated appropriately.
>
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com