perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Arnold <darn...@northcoast.com>
Subject Re: Strange
Date Fri, 02 Jul 2004 21:04:26 GMT
Stas,

>> 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: "
>> 
>Because you didn't load the right modules. Try again with:
>
>perl -wc -MApache2 -MApache::compat AuthAny.pm
>
>in general it's not possible to test code relying on mod_perl run time from 
>the command line.

I got this:

[darnold@ps-114a-2k Apache]$perl -wc -MApache2 -MApache::compat AuthAny.pm
Bareword "Apache::server_root" not allowed while "strict subs" in use at
/usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi/Apache2/Apache/compat
.pm line 255.
Compilation failed in require.
BEGIN failed--compilation aborted.

Is this right?

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