Re: Debugging the CGI - Application
Simple approach: sub Debug($) { my($sMessage) = @_; open(DEBUG, debug.txt) || die(Couldn't open debug file $!); print $sMessage\n; close DEBUG; } Debug(This is a debug message); then you can read your messages after you've run the program. I do that a lot when developing websites, as I do a lot of dynamic generation of pages that make heavy use of style sheets and positioning, etc. Debugging prints to the browser screw up the look, which is sometimes the thing I'm trying to get debugged, or they may break the page altogether. At 12:02 27.06.2001 +0800, Rajeev Rumale wrote: Thanks again. Thats a very Nice piece of information ? But unfortunatelly I am using IIS on Win2k platform. I still condsider it as a very useful and important piece of information on this list. with regards Rajeev Rumale ~~~ Rajeev Rumale MyAngel.Net Pte Ltd.,Phone : (65)8831530 (office) #04-01, 180 B, The Bencoolen, Email : [EMAIL PROTECTED] Bencoolen Street, Singapore - 189648 ICQ: 121001541 Website : www.myangel.net ~~~ - Original Message - From: Me [EMAIL PROTECTED] To: Rajeev Rumale [EMAIL PROTECTED]; 'Beginner Perl' [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 11:13 AM Subject: Re: Debugging the CGI - Application Any more suggestion ? If you are allowed to modify your web server's setup, then: http://www.masonhq.com/docs/manual/Mason.html and prepare for your world to be turned upside down... Aaron Craig Programming iSoftitler.com
Debugging the CGI - Application
Greetings ! I am facing was difficulty in debugging the script in my CGI base application. To get the feel of the program I use print statements where ever possible. But causes problem with setting cookies as this header has to be written before any thing with can be display as html. I would be greatfull if any one can give me better solutions for this. with regards Rajeev Rumale ~~~ Rajeev Rumale MyAngel.Net Pte Ltd.,Phone : (65)8831530 (office) #04-01, 180 B, The Bencoolen, Email : [EMAIL PROTECTED] Bencoolen Street, Singapore - 189648 ICQ: 121001541 Website : www.myangel.net ~~~
Re: Debugging the CGI - Application
I am facing was difficulty in debugging the script in my CGI base application. To get the feel of the program I use print statements where ever possible. But causes problem with setting cookies as this header has to be written before any thing with can be display as html. I would be greatfull if any one can give me better solutions for this. Perhaps CGI::Carp. use CGI::Carp qw(warningsToBrowser); carp Boohoo; warningsToBrowser(1); http://search.cpan.org/
Re: Debugging the CGI - Application
Thanks Me ! ;-|? Thanks Me [EMAIL PROTECTED] :-) Nice to get a suggestion so fast. It works ! Any more suggestion ? with regards Rajeev Rumale ~~~ Rajeev Rumale MyAngel.Net Pte Ltd.,Phone : (65)8831530 (office) #04-01, 180 B, The Bencoolen, Email : [EMAIL PROTECTED] Bencoolen Street, Singapore - 189648 ICQ: 121001541 Website : www.myangel.net ~~~ - Original Message - From: Me [EMAIL PROTECTED] To: Rajeev Rumale [EMAIL PROTECTED]; 'Beginner Perl' [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 10:50 AM Subject: Re: Debugging the CGI - Application I am facing was difficulty in debugging the script in my CGI base application. To get the feel of the program I use print statements where ever possible. But causes problem with setting cookies as this header has to be written before any thing with can be display as html. I would be greatfull if any one can give me better solutions for this. Perhaps CGI::Carp. use CGI::Carp qw(warningsToBrowser); carp Boohoo; warningsToBrowser(1); http://search.cpan.org/
Re: Debugging the CGI - Application
Any more suggestion ? If you are allowed to modify your web server's setup, then: http://www.masonhq.com/docs/manual/Mason.html and prepare for your world to be turned upside down...
Re: Debugging the CGI - Application
Thanks again. Thats a very Nice piece of information ? But unfortunatelly I am using IIS on Win2k platform. I still condsider it as a very useful and important piece of information on this list. with regards Rajeev Rumale ~~~ Rajeev Rumale MyAngel.Net Pte Ltd.,Phone : (65)8831530 (office) #04-01, 180 B, The Bencoolen, Email : [EMAIL PROTECTED] Bencoolen Street, Singapore - 189648 ICQ: 121001541 Website : www.myangel.net ~~~ - Original Message - From: Me [EMAIL PROTECTED] To: Rajeev Rumale [EMAIL PROTECTED]; 'Beginner Perl' [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 11:13 AM Subject: Re: Debugging the CGI - Application Any more suggestion ? If you are allowed to modify your web server's setup, then: http://www.masonhq.com/docs/manual/Mason.html and prepare for your world to be turned upside down...