On Mon, 17 Jul 2000, Andrew Chen wrote:
> In the to-keep list, there's the obvious stuff (database and other base
> libraries) but also I ran a blank script and kept all the variables
> brought up in that blank list (Apache::*, &c.). This way I'm not clearing
> stuff that I'm supposed to.

I'd suggest that you only clear things in your own code, and avoid
clearing anything in code from CPAN modules, Apache:: or otherwise.

> One issue that I have at this point is that although the script runs and
> seems to do what it's supposed to do, it breaks stuff. If I go through
> these steps
> 
> 1) Start httpd
> 2) Run flushvars.cgi (nothing flushed, because it's clean)
> 3) Go to a cgi that loads a bunch of modules
> 4) Run flushvars.cgi (a bunch of stuff is flushed-- just the modules that
>    were loaded in step 3)
> 5) Go to a cgi that uses a lot of the modules that were flushed in step 4
> 6) It breaks
> 
> I think it's trying to call a method for an object that doesn't exist
> anymore. My guess is that I am keeping a certain variable that keeps a
> list of the object in memory or something similar that I should really be
> flushing. Because I'm protecting it, the list doesn't get refreshed. Does
> anyone know the solution to this problem?

You may need to modify %INC.  Try removing the modules that aren't in your
"to keep" list from it at the same point where you clean put their
namespaces.  PerlRun does a variation of this too.

- Perrin

Reply via email to