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.
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've got the following in my httpd.conf:
LoadModule perl_module modules/mod_perl.so PerlModule Apache2 PerlModule Apache::compat
What's the best way to do I do that on a permanent basis?
Write a test suite using Apache-Test, as many modules are moving to.
-- __________________________________________________________________ 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
-- 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