perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Arnold <darn...@northcoast.com>
Subject Strange
Date Fri, 02 Jul 2004 19:04:26 GMT
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='[.\w-]+\@\w+\.[.\w]*[^.]';
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:

[darnold@ps-114a-2k 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.

[darnold@ps-114a-2k 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:

[root@ps-114a-2k 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


Mime
View raw message