You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Perrin Harkins <ph...@gmail.com> on 2007/02/20 21:57:23 UTC

Re: Sry, 1 more question.. Apache2::Reload goofiness

There is no such thing as reloading modules in Perl.  Apache2::Reload
makes a pretty good try at it, but it can never work perfectly since
there is no language support for this feature.  Usually, I just
restart the server when I make a change.  It only takes a couple of
seconds.

At my current job, we write code that works under both CGI and
mod_perl, which means it works fine to run through CGI when you're
developing, and then switch to mod_perl for testing and production.

- Perrin

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Jonathan Vanasco <mo...@2xlp.com>.
On Feb 20, 2007, at 4:03 PM, Perrin Harkins wrote:

> On 2/20/07, Dan_Kelley@ssmhc.com <Da...@ssmhc.com> wrote:
>> Gotcha.  However, restarting apache doesn't seem to do the trick.   
>> Is it maybe unrelated to Apache2::Reload?


Make sure that you're only running 1 server instance ( maxclients =  
1 ).  Things get screwy when you have multiple apache children  each  
updating on their own.

I use reload on dev, and not in production.   there are a bunch of  
function redefined messages going on, but thats fine with me.

also keep in mind that class inheritance will cause issues with  
reload -- you'll generally need to start/stop if you're overloading a  
parent class method or are removing an overload to fall back onto the  
parent class method.

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Anthony Gardner <cy...@yahoo.co.uk>.
Have you tried Apache::StatINC? Actually, is that available for Apache2?

We've also had problems with Apache::Reload here but we're putting that down to using RHEL mod_perl 1.99 ;) Am waiting to get the latest MP2 installed and hopefully it'll help sort the problems out.

But I agreee with Perrin, if you're seeing the problems after bouncing the server, you're either looking at the wrong code ........... or you're sitting at s.o else's desk ;)

-Ants

Perrin Harkins <ph...@gmail.com> wrote: On 2/20/07, Dan_Kelley@ssmhc.com  wrote:
> Gotcha.  However, restarting apache doesn't seem to do the trick.  Is it maybe unrelated to Apache2::Reload?

If stopping and starting apache doesn't pick up your changes,
something is seriously wrong.  You might be looking at the wrong
apache or updating the wrong files.  Note that I mean "apachectl stop"
and "apachectl start".

> I've noticed that if I go through and make a LOT of changes (commenting stuff out), then go back and undo my changes to get me back to square one, that sometimes fixes it.  However, 5 - 10 minutes per change really gets old.

10 minutes?  You should never have to put up with that.  That reminds
me of working on IBM's WebSphere tools.  Your server should only take
a couple of seconds to restart and should pick up all of your changed
perl files.

- Perrin


 		
---------------------------------
 What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Perrin Harkins <ph...@gmail.com>.
On 2/20/07, Dan_Kelley@ssmhc.com <Da...@ssmhc.com> wrote:
> Gotcha.  However, restarting apache doesn't seem to do the trick.  Is it maybe unrelated to Apache2::Reload?

If stopping and starting apache doesn't pick up your changes,
something is seriously wrong.  You might be looking at the wrong
apache or updating the wrong files.  Note that I mean "apachectl stop"
and "apachectl start".

> I've noticed that if I go through and make a LOT of changes (commenting stuff out), then go back and undo my changes to get me back to square one, that sometimes fixes it.  However, 5 - 10 minutes per change really gets old.

10 minutes?  You should never have to put up with that.  That reminds
me of working on IBM's WebSphere tools.  Your server should only take
a couple of seconds to restart and should pick up all of your changed
perl files.

- Perrin

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Da...@ssmhc.com.
Gotcha.  However, restarting apache doesn't seem to do the trick.  Is it 
maybe unrelated to Apache2::Reload?

I've noticed that if I go through and make a LOT of changes (commenting 
stuff out), then go back and undo my changes to get me back to square one, 
that sometimes fixes it.  However, 5 - 10 minutes per change really gets 
old.

Dan Kelley
Sr. Network Analyst
SSM Health Care, Information Center
(314) 768-5144 / (314) 256-9272




"Perrin Harkins" <ph...@gmail.com> 
02/20/2007 02:57 PM

To
"Dan_Kelley@ssmhc.com" <Da...@ssmhc.com>
cc
modperl@perl.apache.org
Subject
Re: Sry, 1 more question.. Apache2::Reload goofiness






There is no such thing as reloading modules in Perl.  Apache2::Reload
makes a pretty good try at it, but it can never work perfectly since
there is no language support for this feature.  Usually, I just
restart the server when I make a change.  It only takes a couple of
seconds.

At my current job, we write code that works under both CGI and
mod_perl, which means it works fine to run through CGI when you're
developing, and then switch to mod_perl for testing and production.

- Perrin



-----------------------------------------
Confidentiality Notice: This email message, including any
attachments, is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.