Stas Bekman wrote:

speeves wrote:

Hi!

Just wondering if Apache::HTTP_FORBIDDEN and Apache::HTTP_INTERNAL_SERVER_ERROR have been implemented? I have been trying to port Apache::AuthenNTLM, and keep getting:

[Tue Jul 15 16:46:08 2003] [error] failed to resolve handler `Apache::AuthenNTLM'
[Tue Jul 15 16:46:08 2003] [error] [client 192.168.1.2] Bareword "Apache::HTTP_FORBIDDEN" not allowed while "strict subs" in u
se at /usr/local/lib/perl/5.6.1/Apache/AuthenNTLM.pm line 593.
Bareword "Apache::HTTP_INTERNAL_SERVER_ERROR" not allowed while "strict subs" in use at /usr/local/lib/perl/5.6.1/Apache/Authe
nNTLM.pm line 597.
Bareword "Apache::HTTP_INTERNAL_SERVER_ERROR" not allowed while "strict subs" in use at /usr/local/lib/perl/5.6.1/Apache/Authe
nNTLM.pm line 632.
BEGIN not safe after errors--compilation aborted at /usr/local/lib/perl/5.6.1/Apache/AuthenNTLM.pm line 671.
Compilation failed in require at (eval 10) line 3.


in the error_log. I have other constants that are imported from Apache::Const, so do not think that it is a problem with scope... Here is the code:

line 593 -- return $self->{ntlmauthoritative} ? (defined($nonce) ? (MP2 ? Apache::HTTP_FORBIDDEN : Apache::Constants::HTTP_
FORBIDDEN) : (MP2 ? Apache::HTTP_INTERNAL_SERVER_ERROR : Apache::Constants::HTTP_INTERNAL_SERVER_ERROR)) : (MP2 ? Apache::DE
CLINED : Apache::Constants::DECLINED) ;


and

line 632 --- # return MP2 ? Apache::HTTP_INTERNAL_SERVER_ERROR : Apache::Constants::HTTP_INTERNAL_SERVER_ERROR ;

If you need more, let me know.



Have you imported them?


use Apache::Const compile ->qw(Apache::HTTP_FORBIDDEN);

All the available Apache:: constants are listed here:

http://perl.apache.org/docs/2.0/api/Apache/Const.html

Yeah, unfortunately... :( Though I seem to be chasing it down to a possible problem with the method handler:

sub handler ($$)

But even with a change to:

sub handler : method

I'm still not able to access the imported CONSTANTS.... This is definitely the most complex port that I've done, so is taking me a little while to find all of the buggies... Will keep you posted :)

speeves
cws



Reply via email to