All,
I get so confused keeping track of everything. I've got some modules that I
swear checked for syntax a few days ago. Here's one that starts:
package Apache::AuthAnon;
# file: Apache/AuthAnon.pm
use strict;
use Apache::Constants qw(:common);
my $email_pat='[EMAIL PROTECTED]';
my $anon_id="anonymous";
sub handler {
my $r=shift;
my($res,$sent_pwd)=$r->get_basic_auth_pw;
return $res if $res!=OK;
my $user=lc $r->connection->user;
my $reason="";
my $check_id=$r->dir_config("Anonymous") || $anon_id;
$reason="user did not enter a valid anonymous username: "
But this morning, suddenly I can't check the syntax:
[EMAIL PROTECTED] Apache]$perl -wc AuthAny.pm
Can't locate Apache/Constants.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.4/i686-linux-thread-multi /usr/lib/perl5/5.8.4
/usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at AuthAny.pm
line 5.
BEGIN failed--compilation aborted at AuthAny.pm line 5.
I've got the following in my httpd.conf:
LoadModule perl_module modules/mod_perl.so
PerlModule Apache2
PerlModule Apache::compat
<Location /protected>
PerlOptions +GlobalRequest
AuthName Anonymous
AuthType Basic
PerlAuthenHandler Apache::AuthAnon
require valid-user
PerlSetVar Anonymous anonymous|anybody
</Location>
So the handler runs fine and does what it should. I tried changing to:
use Apache::Const qw(:common);
But that didn't work either.
[EMAIL PROTECTED] Apache]$perl -wc AuthAnon.pm
Can't locate Apache/Const.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.4/i686-linux-thread-multi /usr/lib/perl5/5.8.4
/usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at AuthAnon.pm
line 5.
BEGIN failed--compilation aborted at AuthAnon.pm line 5.
Here's where the file is on my system:
[EMAIL PROTECTED] apache2]$locate Apache/Const.pm
/usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi/Apache2/Apache/Const.pm
Should I add /usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi/Apache2
to @INC?
What's the best way to do I do that on a permanent basis?
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html