|
Helping ordinary people create extraordinary websites! |
Tips for Convenient CGI ScriptingBy Eugene Logvinov2005-04-14
Displaying script errors in the browser Displaying the syntax and runtime errors on the browser screen can be a big help when you're debugging code. In our case, the scripting cycle will consist of editing script files, saving them, and reloading the browser screen. Let's take a look at how it works. Listing 2. The most complete debug printing code implementation #!/usr/bin/perl -TwNow you've seen an example of the most complete and popular approach (according to the modules used) to code debugging. Although all of the techniques will hardly be used simultaneously in normal circumstances, each one is worth investigating on its own. While the -w flag and "use strict" are great to use here, the -T flag is absolutely necessary, as it highlights the security holes in the script. Tutorial Pages: » Tips for Convenient CGI Scripting » The CGI module » Displaying script errors in the browser » CGI::LogCarp usage and shortcomings » Standard modules of CGI::* type » Resources First published by IBM DeveloperWorks
|
|