You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2002/05/17 10:25:50 UTC
Apache::Constants don't map 1:1 into Apache::Const
Currently we have a problem with Constants in 1.x and 2.x which don't
map 1:1, since in 2.0 some constants are gone, some are renamed. See the
report below.
How should we deal with that? Currently Apache::compat only forwards the
symbols to Apache::Const, so this doesn't always work.
Do we need to manually trap requests for the renamed and removed
constants in Apache::compat and satisfy the caller?
-------- Original Message --------
Subject: compatibility problem
Date: Fri, 17 May 2002 16:43:32 +1000 (EST)
From: Jie Gao <J....@isu.usyd.edu.au>
To: modperl@perl.apache.org
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?
Thanks,
Jie
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Apache::Constants don't map 1:1 into Apache::Const
Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 17 May 2002, Stas Bekman wrote:
> Currently we have a problem with Constants in 1.x and 2.x which don't
> map 1:1, since in 2.0 some constants are gone, some are renamed. See the
> report below.
REDIRECT and the like have been deprecated in apache for years, in favor
of the HTTP_* names. there are a couple of shortcut names carried over in
the modperl2 api (see ModPerl/Code.pm:%shortcuts). REDIRECT should
probably be part of that list. however, we should not attempt to provide
a mapping for _all_ of the old deprecated names. in this particular case,
the module can be changed from:
use Apache::Constants qw(:response REDIRECT);
to
use Apache::Constants qw(HTTP_MOVED_TEMPORARILY ...);
where '...' is the fully qualified name.
then it'll work with both 1.x and 2.x
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org