Does that work under Unix only? I am on NT and it does not appear to work.
Can someone clarify.

Thanks
Scott

-----Original Message-----
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 9:38 PM
To: Bryan Coon
Cc: Matt Sergeant; '[EMAIL PROTECTED]'
Subject: Re: Apache::Reload???


On Tue, 31 Jul 2001, Bryan Coon wrote:

> I must have missed something in setting up Apache::Reload.  What I want is
> simple that when I make a change in my scripts I dont have to restart the
> Apache server...
> I put
> PerlInitHandler Apache::Reload
> in my httpd.conf, and added 'use Apache::Reload' to the modules that I
want
> to be reloaded on change.  But I get the following warning message in my
> apache logs:
> Apache::Reload: Can't locate MyModule.pm for every module I have added
> Apache::Reload to.
>
> How do I do this so it works?  The docs on Reload are a bit sparse...

Your problem probably comes from the fact that @INC is reset to its
original value after its get temporary modified in your scripts. Of course
when Apache::Reload tries to find the file to test for its mod time, it
cannot find it.

The solution is to extend @INC at the server startup to include
directories you load the files from which aren't in @INC.

For example, if you have a script which loads MyTest.pm from
/home/stas/myproject:

  use lib qw(/home/stas/myproject);
  require MyTest;

Apache::Reload won't find this file, unless you alter @INC in startup.pl:

  startup.pl
  ----------
  use lib qw(/home/stas/myproject);

and restart the server

I'll add these notes to the guide. Matt probably wants to add these to the
Apache::Reload docs as well :)

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Reply via email to