Shannon Eric Peevey wrote:
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... :(

Why 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

This is an interesting one. How to make the two coexist in the same code base. Ideally you want to do this:


sub handler1 ($$) {}
sub handler2 : method {}

*handler = MP2 ? \&handler2 : \&handler1;

But probably it'll complain about different prototypes. Or it might just work. Give it a try.

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 :)

probably because a mistake in my example above, drop the compile part.



__________________________________________________________________ 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