Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

mod_perl2 packages missing.

by TedYoung (Deacon)
on Apr 30, 2007 at 18:53 UTC ( [id://612833]=perlquestion: print w/replies, xml ) Need Help??

TedYoung has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I am trying to get mod_perl2 running a debian 3 box. Naturally I have Apach2 and Mod_Perl2 packages installed. The problem is my test handler cannot find any of the Apache2 or ModPerl libs in @INC.

My Handler:

package CEAS4; use strict; use warnings; use Apache2::Const -compile => qw(OK); sub handler { my $r = shift; print "Content-type: text/html\n\n"; print "mod_perl 2.0 rocks!\n"; return Apache2::Const::OK; } 1;

My error message:

failed to resolve handler `CEAS4': Can't locate Apache2/Const.pm in @I +NC (@INC contains: /home/www/hosts/dev/ceas4 /etc/perl /usr/local/lib +/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/per +l5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . / +etc/apache2) at /home/www/hosts/dev/ceas4/CEAS4.pm line 11.\nBEGIN fa +iled--compilation aborted at /home/www/hosts/dev/ceas4/CEAS4.pm line +11.\nCompilation failed in require at (eval 2) line 3.

Where things get really silly is my list of files in /usr/lib/perl5:

/usr/lib/perl5/Apache2 /usr/lib/perl5/Apache2/Apache /usr/lib/perl5/Apache2/Apache/Access.pm /usr/lib/perl5/Apache2/Apache/BuildConfig.pm /usr/lib/perl5/Apache2/Apache/Build.pm /usr/lib/perl5/Apache2/Apache/CmdParms.pm /usr/lib/perl5/Apache2/Apache/Command.pm /usr/lib/perl5/Apache2/Apache/compat.pm /usr/lib/perl5/Apache2/Apache/Connection.pm /usr/lib/perl5/Apache2/Apache/Const.pm /usr/lib/perl5/Apache2/Apache/Directive.pm /usr/lib/perl5/Apache2/Apache/Filter.pm /usr/lib/perl5/Apache2/Apache/FilterRec.pm /usr/lib/perl5/Apache2/Apache/HookRun.pm /usr/lib/perl5/Apache2/Apache/Log.pm /usr/lib/perl5/Apache2/Apache/Module.pm ... /usr/lib/perl5/Apache2/APR/Const.pm /usr/lib/perl5/Apache2/APR/Date.pm /usr/lib/perl5/Apache2/APR/Error.pm /usr/lib/perl5/Apache2/APR/Finfo.pm /usr/lib/perl5/Apache2/APR/IpSubnet.pm ... /usr/lib/perl5/Apache2/ModPerl/RegistryCooker.pm /usr/lib/perl5/Apache2/ModPerl/RegistryLoader.pm /usr/lib/perl5/Apache2/ModPerl/Registry.pm /usr/lib/perl5/Apache2/ModPerl/StructureMap.pm /usr/lib/perl5/Apache2/ModPerl/TestReport.pm ...

Using Apache2::Apache:: instead of just Apache2:: doesn't work because it cannot find ModPerl::

So, I thought that /usr/lib/perl5/Apache2 should have been in @INC, but then the namespace for everything would just be Apache:: not Apache2::

What am I doing wrong here?

Ted Young

($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)

Replies are listed 'Best First'.
Re: mod_perl2 packages missing.
by rhesa (Vicar) on Apr 30, 2007 at 19:23 UTC
    Debian 3 (aka Sarge) doesn't have the real 2.0 version of mod_perl. They packaged an old preview release (1.99 something) which doesn't include the final API.

    Maybe you could find a backport somewhere, but I never looked. I recommend you either upgrade to Debian 4 (aka Etch), or install your own mod_perl2 from source.

      Thanks, the Sarge modperl package was in fact 1.99. For those of you needing modperl under Sarge, I found http://backports.org has a 2.02 package.

      Ted Young

      ($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://612833]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-18 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found