in reply to Re: mod_perl debugging help
in thread mod_perl debugging help

Badly phrased post on my count, absolutley nothing was an overstatement, I am getting the undefined subroutine message for the handler subroutine, however I get nothing else besides that which isnt really super usefull.

Replies are listed 'Best First'.
Re^3: mod_perl debugging help
by Joost (Canon) on Jun 22, 2006 at 19:38 UTC
      [error] Undefined subroutine &FormGenerator::handler called


      Originaly I did think this was a globals issue, it seems to be the most common cause of it, however i've gone through and removed any globals (running in strict).

      As for the code, I know it's not terribly helpfull but I cant really put it up, a) it's work b) it's about 680 lines :)

      What I really need at this point is new ideas on how to actualy locate the bug, much easier to fix when I actualy know what im looking for :)
        Hmm... are you using funky stuff like INIT handlers to load the FormGenerator module, or is the handler generated at runtime somewhere?

        My first guess would be that a new apache child gets started that doesn't load all required modules, (in other words, you're not sharing all the modules you think you do).

        Ofcourse, it's possible you're deleting the method somewhere, or it might be a nasty bug in some other method. Any special modules (especially C/XS) you're using?

        Is there anything else on the server that uses the 'FormGenerator' namespace?

        It's WAY too generic. If some other CGI running under mod_perl uses that namespace, when your script runs, it'll see that a module with that name is loaded, and not bother loading anything. You'll then get strange error messages about functions not found.

        (or worse, they both use the same subroutines names, and you end up with odd behaviour that is almost impossible to track down on larger systems)