[EMAIL PROTECTED] (Perrin Harkins) wrote:

>On Mon, 17 Jul 2000, Andrew Chen wrote:
>
>> On Mon, 17 Jul 2000, Perrin Harkins wrote:
>> 
>> > > 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.
>> 
>> I did what you suggested and I have it clearing out the proper
>> entries in %INC. The problem is that it still doesn't work! Even
>> though they don't exist in the hash, when a cgi needs a module it
>> still tries to call it from memory.
>> 
>> Is there maybe another variable that I should be looking at?
>
>I'm running out of ideas.  You could try changing your "use" statements
>to "require" and see if that helps.  I thought PerlRun would cause
>these to be executed every time, but maybe not.

Changing to "require" should help.  Remember that "use" is equivalent to
"require" and "import" in a BEGIN block (the BEGIN block is the
important part), so it will only happen once even if the same code is
run over and over.

Then again, something still puzzles me about this situation too, though
I can't put my finger on it.  I'm not sure I understand the ins and outs
of what PerlRun does with BEGIN blocks, for instance.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum


Reply via email to