|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re: use CGI or die;by epoptai (Curate) |
| on Jan 14, 2001 at 12:38 UTC ( #51717=note: print w/ replies, xml ) | Need Help?? |
|
I always use strict, -w and fatalsToBrowser when developing, but today this caused me a huge headache in a simple script (with no syntax errors) that merely reads a file, formats the contents, and displays the html. It runs fine from the command line (with a few uninitialized value warnings) and could save the output with but it would just whirl and give no output via CGI. I found that the code looks and behaves perfectly via CGI unless both -w and fatalsToBrowser are enabled! Shut either one off (leaving the other on) and it works fine. I found a certain loop in the program that seems to cause this by throwing pairs of =cut around, but the loop seems mundane and similar to the others. Is this odd interplay between -w and fatalsToBrowser documented? Update: I said i'd node the entire script to craft in a day or two but am finding it difficult to abstract a simplified example. So i'll just suggest that if your error-free cgi script mysteriously hangs, turning off either -w or fatalsToBrowser may help.
In Section
Meditations
|
|
||||||||||||||||||||||