Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging Perl on Win2k3

Status
Not open for further replies.

yesti

MIS
Dec 8, 2000
166
US
I have a Win2k3 server SP1 with AcitvePerl 5.8.3.809 installed to C:\Perl.

I inherited .plx/.tmpl pages that I need to add features to. Problem is, when I make a change and it is wrong then the page hangs and/or I get the ‘produced no output’ error. If I undo the changes, I still get the symptoms. I have to restart the IIS application pool and/or Web Site and/or IIS Admin Service (if the first one doesn’t work I have to do the others) and even after that it takes 15-30 seconds to redisplay the original page.

I tried adding ‘use warnings’ to the pages and that did not help. When I added ‘use diagnostics’ to an otherwise functional page, I get the symptoms. So how do I get ‘use diagnostics’ to work properly?

Much time and frustration is spent debugging since I do not get any error telling me what I did wrong so it is an ‘all or nothing’ doing these pages. The templates add more places to get wrong which doesn’t help.
 
After doing a bit more searching it seems I was handed possibly 'defective' code that works when 'use diagnostics' is absent but bombs out when it is used. Short of posting all the code here, how can I determine what to do?
 
Guess I'll port it over to something else...
 
Another thing I noticed yesterday is the page shows up one time, then if I refresh the browser, I get the "'D:\script.plx' script produced no output" error and can't get it back. Why would it work once then give this error?
 
took out the 'use warnings' and all is well. one day when i understand perl better i can figure out what was going on.
 
Sounds like the 'use diagnostics/warnings' was producing some errors prior to the printing of the "Content-Type". There are some things you can do with the Carp module that will put the errors out properly in the browser. Anything in the server logs that might help you?

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
post some of the warnings you have been getting. They should be in the server error log.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Sorry, I'm going on leave till next week Monday. Thanks for the replies, I'll see what I can dig up then.
 
Okay, turned on use warnings, page loaded. Turned on use diagnostics, got this in the PerlIS-Err.log:

Argument "" isn't numeric in addition (+) at ./tcno_brk.tmpl.ttc line 252 (#1)
(W numeric) The indicated string was fed as an argument to an operator
# that expected a numeric value instead. If you're fortunate the message
1)
will identify which operator was so unfortunate.
fortunatðXâe message
1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top