I've come across this issue a few times in my Perl life time, but previously I've always been able to fix it after messing with the code for long enough. Right now however its not happening at all and I don't have alot of time to manually debug the whole script.

Anyway, my point is that I'm using CGI::Carp but yet I still am getting 500 Internal Server Error in the browser. Below is the brief snippit of code that includes the module:


###########  TO IMPLEMENT
# Build in formatting

use DBI;
use CGI;
use CGI::Cookie;
use CGI::Carp qw(fatalsToBrowser);

#open new cgi
$q = new CGI;

Incase anyone suggests it the module does exist, and I've run the script successfully before but this time some of the parameters are causing it to fail.

Is there anything that causes CGI::Carp not to work and just return the usual 500 server error ? Is there any other way I can forceable return errors to the browser ?

Thanks for any help or suggestions.


In reply to CGI::Carp failing to report errors by oghran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.