Re: Resetting cache Apache::Registry

2002-12-03 Thread Geoffrey Young


The situation is that I?m using a shared server from a 3rd party hosting 
provider and I do not have control over what they have in their Apache 
configuration file.  Every time I make a change to a helper file I need 
them to restart Apache.

on the Cobalt and Ensim systems I have websites at, I was able to just 
create a .htaccess file with

PerlInitHandler Apache::StatINC

in it and let that take care of everything.

HTH

--Geoff





RE: Resetting cache Apache::Registry

2002-12-03 Thread Justin Luster
Thank you.  That is a good suggestion.

-Original Message-
From: Geoffrey Young [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 9:56 AM
To: Justin Luster
Cc: [EMAIL PROTECTED]
Subject: Re: Resetting cache Apache::Registry


 The situation is that I?m using a shared server from a 3rd party
hosting 
 provider and I do not have control over what they have in their Apache

 configuration file.  Every time I make a change to a helper file I
need 
 them to restart Apache.

on the Cobalt and Ensim systems I have websites at, I was able to just 
create a .htaccess file with

PerlInitHandler Apache::StatINC

in it and let that take care of everything.

HTH

--Geoff








Re: Resetting cache Apache::Registry

2002-12-03 Thread Perrin Harkins
Justin Luster wrote:


I know that when you “require” or “use” helper files in a Perl Script,
and you are using Apache::Registry, when changes are made to the helper
files they are not recognized until you restart Apache.  In the
documentation it says that you can change the Apache configuration file
to do this for you.



That's a reference to Apache::Reload or Apache::StatINC.  You can do 
that in an htaccess file if your host allows it.

  What I want to know is if there is a way to clear
out the files or code in the Apache::Registry cache via a Perl Script. 


Yes, but understand that we're not talking about the Apache::Registry 
cache here.  A::R just caches your CGI script itself, not the modules. 
The modules are cached as a normal function of Perl, i.e. once it has 
compiled a module that module stays in memory until the Perl process 
shuts down.

To make Perl reload a module, you can do this:

delete $INC{'Your/Module.pm'};
require Your::Module;

But that glosses over a lot of details about imports and such, so you're 
better off using Apache::Reload if you can.

- Perrin