Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Commenting out carpout causes script to hangby punch_card_don (Curate) |
on Oct 10, 2007 at 14:45 UTC ( [id://643974]=perlquestion: print w/replies, xml ) | Need Help?? |
punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
Mucky Monks,
It's the darndest thing - my script uses the DBI to retrieve some data from a MYSQL database then output it into a Template::Toolkit template. Among other things, these lines are included at the top of the script to give me useful debugging info: And everything runs hunky-dory. Script runs to completion just fine, no error messages output to the browser. So I'm done developing, time to turn off the error messages, so I comment out: And it hangs. Just sits there 'til the browser times out. Comment back in, runs just fine again. What the hey?
Forget that fear of gravity, Get a little savagery in your life. UPDATE: Problem Solved Many thanks to philcrow and ikegami - using their various suggestions, the script now runs just fine with carpout commented out. Here's how I applied their info: Via telnet, used the "Script" unix command to start script logging into a text file Then ran the perl script successfully by passing all the parameters needed Stop the script logger This has the excellent result of outptting everything - error messages and html output - to the debug.txt file for review. I found a few things, including a sub-routine that was present in two separate places (this script "includes" several others), and a whole whack of lines using undeclared variables in if-statements. Cleaning it all up magically made it run.
Back to
Seekers of Perl Wisdom
|
|