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

Reply via email to