jfroebe has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I know that CGI::Carp and mod_perl 2.0 don't work together. What is being used to produce the same behavior as fatalstobrowser? Meaning, all fatal errors are sent to the browser/user.

I'm not certain if Mason itself can screw it up. Note that PerlSetVar MasonErrorMode output produces no output at all while PerlSetVar MasonErrorMode fatal writes the fatal errors to the errorlog.

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

  • Comment on mod_perl 2 and CGI::Carp fatalstobrowser

Replies are listed 'Best First'.
Re: mod_perl 2 and CGI::Carp fatalstobrowser
by perrin (Chancellor) on Jul 31, 2006 at 23:52 UTC
    Mason is supposed to make CGI::Carp unnecessary. It should show you the error message in a nice debug screen with formatted code.

      Yup, but for some reason (possibly due to the RedHat build), I receive a blank screen instead of the formatted code. I've been gone for a week so I haven't had a chance to track down the exact cause

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Re: mod_perl 2 and CGI::Carp fatalstobrowser
by monarch (Priest) on Aug 02, 2006 at 09:30 UTC

      yup, the writing the errors to the apache errorlog is a good alternative except when the developer isn't allowed read access to the errorlog (apache is administered by another group).

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

        Uh, you do web development work without a local install on your own desktop/laptop of the database, Apache and the rest of the neccesary environment?

        Sounds... painful. Isn't it hard to e.g. write tests if you can't separate out everything cleanly? (Or is the DB helvetes(*) large and just too much to keep locally?)

        (*) I saw people discussing in the CB that we shouldn't offend people with four letter words. If any over-sensitive people know Swedish, please let me know and I'll Google for the relevant expressions in some other language. :-)