Just started working on Apache-AuthNTLM and came across the cross reference that you posted awhile back. This might be where I got it:Shannon Eric Peevey wrote: [...]
Also, you don't realy have to do that. The old ala mp1 style works just fine.
use Apache::Const qw(OK DECLINED)
sub handler {
return OK;
}
Well... I must have been smoking crack, 'cause I seem to remember a simple:
return MP2 ? Apache::OK : OK
throwing an error, hence, the change to:
MP2 ? Apache::OK : Apache::Constants::OK
Now that I test it, though, there doesn't seem to be a problem... :P
May be you haven't been importing the constant. These two aren't the same:
use Apache::Const qw(OK DECLINED); use Apache::Const -compile => qw(OK DECLINED);
the latter only compiles the constants, the former compiles and imports it.
[...]
sub handler { # ... return MP2 ? Apache::OK : Apache::Constants::OK; } 1;
in the "mod_perl 1.0 and 2.0 Constants Coexistence" section of:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Constants_
speeves cws