|
| What is mod_perl ? | |
| mod_perl brings together two of the most powerful and mature technologies available to the web professional today.
| |
|
| |
| Importing CGI Methods | |
| A large number of scripts allocate only a single query object, use it to read parameters or to create a fill-out form, and then discard it. For this type of script, it may be handy to import CGI module methods into your name space. | |
|
| |
| Reset to defaults button | |
| | |
|
| |
| CGI.pm and the Year 2000 Problem | |
| | |
|
| |
| HTTP Session Variables | |
| The list of some useful environment variables that can be fetched. | |
|
| |
| Debugging CGI | |
| If you are running the script from the command line or in the perl debugger, you can pass the script a list of keywords or parameter=value pairs on the command line or from standard input (you don't have to worry about tricking your script into reading from environment variables). | |
|
| |
| Hidden fields | |
| | |
|
| |
| Avoiding Denial of Service Attacks | |
| This script will save its state to a file of the user's choosing when the "save" button is pressed, and will restore its state when the "restore" button is pressed | |
|
| |
| HTTP Cookies | |
| A cookie is a name=value pair much like the named parameters in a CGI query string. CGI scripts create one or more cookies and send them to the browser in the HTTP header. | |
|
| |
| AUTOESCAPING HTML | |
| By default, all HTML that are emitted by the form-generating functions are passed through a function called escapeHTML() | |
|
| |
| Using NPH Scripts | |
| NPH, or "no-parsed-header", scripts bypass the server completely by sending the complete HTTP header directly to the browser. | |
|
| |
| Support for Frames | |
| CGI.pm contains support for HTML frames, a feature of Netscape 2.0 and higher, and Internet Explorer 3.0 and higher. | |
|
| |
| Support for Cascading Style Sheets | |
| CGI.pm has limited support for HTML3's cascading style sheets (css). | |
|
| |
| Clickable Images | |
| | |
|
| |
| A Script that Uses Self-Referencing URLs to Jump to Internal Links | |
| A Script that Uses Self-Referencing URLs to Jump to Internal Links | |
|
| |
| Autoescaping HTML | |
| | |
|
| |
| JavaScript Buttons | |
| | |
|
| |
| Support for JavaScript | |
| Netscape versions 2.0 and higher incorporate an interpreted language called JavaScript. Internet Explorer, 3.0 and higher, supports a closely-related dialect called JScript. JavaScript isn't the same as Java, and certainly isn't at all the same as Perl, which is a great pity. | |
|
| |
| PRETTY-PRINTING HTML | |
| By default, all the HTML produced by these functions comes out as one long line without carriage returns or indentation. This is yuck, but it does reduce the size of the documents by 10-20%. | |
|
| |