[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Method Handler not working
From:       MARTIN MOSS <martin_moss () btopenworld ! com>
Date:       2004-07-26 11:20:36
Message-ID: 20040726112036.18147.qmail () web86205 ! mail ! ukl ! yahoo ! com
[Download RAW message or body]

--- Perrin Harkins <perrin@elem.com> wrote: > On Fri,
2004-07-23 at 18:12, MARTIN MOSS wrote:
> > My question is, If you don't have a PerlModule
> > statement or a use My::Module, or a require or a
> > +My::Module statement  so it looks like this
> > 
> > #PerlModule My:Module
> > <Location />
> > set-handler PerlScript
> > PerlHandler My::Module 
> > </Location>
> > 
> > But the module My::Module is on the Include path
> for
> > apache (hmm or is that the apache user), What
> exactly
> > happens?
> 
> mod_perl tries to load it at request time.  There
> are two reasons why
> this is bad.  The first is that it doesn't allow for
> copy-on-write
> shared memory.  You want to load it before the fork,
> and this doesn't do
> that.  The second is that it doesn't know about the
> method prototyping
> and thus your handler is not called as a method.
> 
> So, load the module first.  You can do it in any
> number of ways
> (startup.pl is common).  I think this will fix your
> problem.
> 
> - Perrin

I have a little note to add, It seems that under
freeBSD the above bad method does seem to work ok (or
at least gives that illusion),  But on Redhat, it
doesn't. Anybody have any ideas why this is?

Marty




	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - \
all new features - even more fun!  http://www.allnewmessenger.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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic