in reply to Re: Mason problems
in thread Mason problems

Sorry, should have said the function causing the error seems to be random (it will work sometimes). I don't think it is a cache problems with the browser as it still throws an error even if you force a reload from the server.

Replies are listed 'Best First'.
Re^3: Mason problems
by Anonymous Monk on Jul 07, 2008 at 14:45 UTC
    The browser doesn't know about modules :) check, the module, is maybe being cached by the server (mod_perl, and maybe differently by each child).
      Sorry, your suggestions are above me. How would I check if mod_perl is caching the module. If it is a cache problem, why is the routine that causes the error keep changing?
      Sometimes it is one, other times it is four, or when it fancies it six.

        > How would I check if mod_perl is caching the module

        The anon monk meant "check(), your module,..." not for you to check the caching.

        > why is the routine that causes the error keep changing?

        Apache always starts a few server threads/processes to handle indivual http requests so that it can process more than one request at the same time. In case you are using mod_perl each process has its own mod_perl environment and its own variable space. So if you don't initialize a global variable in a perl script (common mistake in mod_perl), each of these processes might have a different value for this variable, each in its own cache.

        Note I have no explanation for the missing subs. This is just an explanation how repeated requests to a web server might change without any reason

        To find out if that is the case, apache can be started to use only one server process (with parameter -X, the debug mode). That should prevent the random results and hint at problems with the persistent state of mod_perl