Writing CGI Applications with Perl offers the most practical examples of applying Web programming techniques to real world problems I've seen yet. The text blends good CGI programming techniques, idiomatic Perl, and databases int, Writing CGI Application with Perl4 out of 5 stars based on 2 reviews
Sold Out
Book Categories |
Foreword | xiii | |
Preface | xv | |
Acknowledgments | xix | |
Chapter 1 | Perl, CGI, and this Book | 1 |
1.1 | What Is Perl? | 1 |
1.2 | What Is CGI? | 3 |
1.2.1 | Why Perl Is Good for CGI | 4 |
1.3 | About this Book | 5 |
1.3.1 | Who Is this Book For? | 6 |
1.3.2 | Conventions Used in this Book | 6 |
1.3.3 | Using perldoc | 7 |
1.4 | Using the CPAN | 10 |
Chapter 2 | What You Should Know | 15 |
2.1 | Prerequisites | 15 |
2.2 | Editors | 18 |
2.3 | File Permissions | 18 |
2.4 | Basic Security Concerns | 19 |
2.5 | Using -T | 20 |
2.6 | Checking for Taintedness and Laundering Data | 22 |
2.7 | Your PATH and -T | 27 |
2.8 | Installing a Script | 29 |
2.9 | Troubleshooting | 32 |
2.10 | Caching | 38 |
2.10.1 | The Expires HTTP Header | 40 |
2.10.2 | Cache-Control HTTP Header | 41 |
2.11 | Listings | 42 |
Chapter 3 | Using Your Environment | 45 |
3.1 | Introduction to %ENV | 45 |
3.2 | Adding to %ENV | 48 |
3.3 | Form Input Primer | 53 |
3.4 | Example Script: Visitor Log | 55 |
3.5 | Example Script: Basic Report | 62 |
3.6 | Reader Exercise | 65 |
3.7 | What Have We Learned? | 66 |
3.8 | Listings | 67 |
Chapter 4 | Introduction to Web Forms | 69 |
4.1 | Introduction | 69 |
4.2 | Form Tags | 74 |
4.3 | Reading Form Input with CGI.pm | 84 |
4.4 | Making Your Users Happy | 92 |
4.5 | Final Example | 93 |
4.6 | User Exercises | 100 |
4.7 | Program Listings | 101 |
Chapter 5 | Working with Cookies | 105 |
5.1 | Introduction | 105 |
5.2 | Security | 106 |
5.3 | Limitations | 106 |
5.4 | Cookie Pieces | 106 |
5.5 | Working with Cookies the Manual Way | 108 |
5.6 | Baking Cookies with CGI.pm | 111 |
5.7 | Controlling User Preferences with Cookies | 114 |
5.8 | User Exercises | 121 |
Chapter 6 | Access Counters | 123 |
6.1 | Introduction | 123 |
6.2 | Example Script: SSI Text Counter | 124 |
6.3 | Example Script: SSI Image Counter | 130 |
6.4 | Example Script: SSI Text Counter, with a Twist | 133 |
6.5 | Example Script: An Imageless Image Counter | 136 |
6.6 | Counter Conclusion | 139 |
6.7 | Reader Exercises | 140 |
6.8 | Listings | 140 |
Chapter 7 | Web-Based File Uploading | 143 |
7.1 | Introduction | 143 |
7.2 | File Uploading Basics | 144 |
7.3 | Viewing Files | 160 |
7.4 | Uploading Multiple Files | 163 |
7.5 | Reader Exercises | 172 |
7.6 | File Listings | 173 |
Chapter 8 | Tracking Clicks | 181 |
8.1 | Introduction | 181 |
8.2 | Example Script: A Simple Click Tracker | 182 |
8.3 | Example Script: Random Images | 187 |
8.4 | Example Script: Click Tracking (Reprise) | 192 |
8.5 | Reader Exercises | 193 |
8.6 | Listings | 194 |
Chapter 9 | Using mod_perl | 197 |
9.1 | What Is mod_perl? | 197 |
9.2 | Configuring mod_perl | 199 |
9.3 | Apache::Registry | 201 |
9.4 | Automatic Headers and Footers with Apache::Sandwich | 204 |
9.5 | A mod_perl Photo Album with Apache::Album | 209 |
9.6 | Authentication with Apache::AuthDBI | 217 |
9.7 | Writing a mod_perl Handler | 220 |
9.8 | Reader Exercises | 226 |
9.9 | Listings | 226 |
Chapter 10 | Web-Based E-mail | 229 |
10.1 | Introduction | 229 |
10.2 | Example Script: Checking POP3 Mail via the Web | 230 |
10.3 | Example Script: Reading E-mail via the Web | 244 |
10.4 | Example Script: Displaying Attachments | 253 |
10.5 | Example Script: Composing E-mail | 256 |
10.6 | Reader Exercises | 260 |
10.7 | Listings | 261 |
Chapter 11 | Introduction to DBI and Databases on the Web | 267 |
11.1 | Introduction | 267 |
11.2 | Using the Perl DBI | 269 |
11.3 | Connecting to the Database | 270 |
11.3.1 | Disconnecting from the Database | 271 |
11.4 | Preparing and Executing an SQL Query | 272 |
11.5 | Fetching Data | 274 |
11.5.1 | The fetchall_arrayref() Method | 274 |
11.5.2 | The fetchrow_arrayref() Method | 277 |
11.5.3 | The fetchrow_hashref() Method | 279 |
11.5.4 | The bind_columns() Method | 280 |
11.6 | Putting It All Together | 281 |
11.6.1 | The do() Method | 286 |
11.6.2 | Wrapping It Up | 286 |
11.7 | Reader Exercises | 287 |
11.8 | Listings | 287 |
Chapter 12 | Tied Variables | 293 |
12.1 | Introduction | 293 |
12.2 | Setting It All Up | 295 |
12.3 | Getting Started | 296 |
12.4 | Diving In | 297 |
12.5 | The Main Program | 307 |
12.6 | Finishing the ShopCart Module | 316 |
12.7 | Running the Program | 326 |
12.8 | Wrapping It Up | 329 |
12.9 | Program Listings | 330 |
Chapter 13 | Embedding Perl in HTML with Mason | 339 |
13.1 | Introduction | 339 |
13.2 | Installation | 340 |
13.3 | The Strategy | 340 |
13.4 | Mason Syntax | 340 |
13.5 | Special Mason Components | 344 |
13.6 | Cascading Execution | 344 |
13.7 | Moving Right Along | 345 |
13.8 | rss2html | 350 |
13.9 | my_news | 356 |
13.10 | footer | 357 |
13.11 | Wrapping It Up: The Code for the Example Site | 360 |
Chapter 14 | Document Management via the Web | 369 |
14.1 | Introduction | 369 |
14.2 | The Plan | 370 |
14.3 | auth.cgi | 372 |
14.4 | shared.pl | 378 |
14.5 | main.cgi | 381 |
14.6 | upload.cgi | 390 |
14.7 | viewer.cgi | 401 |
14.8 | Program Listings | 406 |
Chapter 15 | Dynamically Manipulating Images | 419 |
15.1 | Introduction | 419 |
15.2 | Adding Shapes and Text | 420 |
15.3 | Creating a Dynamic Graph | 424 |
15.4 | Creating Thumbnail Images | 432 |
15.5 | Filtering Images with Image::Magick | 436 |
15.6 | Animated Images | 442 |
15.7 | Reader Exercises | 443 |
15.8 | Listings | 444 |
Chapter 16 | RSS And XML | 449 |
16.1 | XML and RSS Overview | 449 |
16.1.1 | Structure of an XML Document | 450 |
16.2 | News Portals with RSS | 450 |
16.2.1 | A Home Page News Portal | 453 |
16.3 | Creating an RSS File | 464 |
16.4 | Reader Exercises | 466 |
16.5 | Listings | 466 |
Appendix A | Server Codes | 471 |
100-199: Provide confirmation that a request is being processed | 471 | |
200-299: Request was performed | 471 | |
300-399: Request not performed | 472 | |
400-499: Request is incomplete | 472 | |
500-599: Internal server errors | 474 | |
Appendix B | Environment Variables | 475 |
Appendix C | POSIX::strftime() Formats | 477 |
Appendix D | General Public License | 481 |
Appendix E | Artistic License | 489 |
Appendix F | Perl Documentation | 493 |
Appendix G | ASCII Codes | 497 |
Appendix H | Special HTML Characters | 503 |
Resources | 509 | |
Index | 511 |
Login|Complaints|Blog|Games|Digital Media|Souls|Obituary|Contact Us|FAQ
CAN'T FIND WHAT YOU'RE LOOKING FOR? CLICK HERE!!! X
You must be logged in to add to WishlistX
This item is in your Wish ListX
This item is in your CollectionWriting CGI Application with Perl
X
This Item is in Your InventoryWriting CGI Application with Perl
X
You must be logged in to review the productsX
X
X
Add
Writing CGI Application with Perl,
|