Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Web, Graphics, and Perl/Tk: Best of the Perl Journal
SPECIAL OFFER: Upgrade this ebook with O’Reilly
A Note Regarding Supplemental Files
Preface
Finding Perl Resources
Conventions Used in This Book
Comments and Questions
Acknowledgments
1. Introduction
I. Web
2. CGI Programming
CGI Programming Without CGI.pm
The CGI.pm Module
3. Saving CGI State
State in CGI Scripts
A Sample State-Maintaining CGI Script
4. Cookies
Creating Cookies
Retrieving Cookies
A Sample Cookie Program
5. mod_perl
Transaction Handlers
A Typical Content Handler
Apache::Registry
A Typical Non-Content Handler
Getting Fancy: A Stately Script
Impaled by the Fork
Other mod_perl Features
6. Creating mod_perl Applications
So, What Is This mod_perl Thing, Anyhow?
Developing with mod_perl
Apache::Registry
Embperl
Writing Your Own Handler
Performance
Preload Your Modules
Use Multiple Servers
Our Sample Application
Components
DBI and Apache::DBI
Apache::AuthDBI
Apache::Sandwich
Writing the Application Code
Database Setup
TopTenTrans.pm
index.epl
rateit
ttadmin
Putting It All Together
httpd.conf
7. Proxying with mod_perl
Why Proxy?
How the Proxy Protocol Works
Identifying Ads
8. Authentication with mod_perl
Access Control
Authentication
Windows Domain Server Authentication
More NT Authentication
Authorization
Basic Authorization
More Sophisticated Authorization
Conclusion
9. Navigation Bars with mod_perl
The Configuration File
Activating the Navigation Bar
Generating the Navigation Bar
A Foundation to Build On
10. Scripting the Web with LWP
11. Five Quick Hacks: Downloading web Pages
Downloading Currency Exchange Rates
Downloading Weather Information
Downloading News Stories
Completing U.S. Postal Addresses
Downloading Stock Quotes
Conclusion
Afterword
12. Downloading Web Pages Through a Proxy Server
Afterword
13. HTML::Parser
Getting Started
The Identity Parser
The HTML Tag Stripper
Another Example: HTML Summaries
Another Fictional Example
Using HTML::Parser Version 3
Acknowledgments
14. Scanning HTML
HTML::Parser, HTML::TreeBuilder, and HTML::Element
Scanning HTML Trees
Complex Criteria in Tree Scanning
A Case Study: Scanning Yahoo! News
Regardez, Duvet!
15. A Web Spider in One Line
Callbacks and Closures
Cascading Arrows
Using Modules with One-Liners
The End
16. Webpluck
Similar Tools
How to Use webpluck
How webpluck Works
The Dark Side of the Force
Identify Yourself
Don’t Overload a Site
Obey Robot Exclusion Rules
17. Torture-Testing Web Servers and CGI Scripts
The Code
Wrapping Up
18. Securing Your CGI Scripts
The Example Script
Designing the Script
The chat2.pl Library
Oops
The CGI Script
The Rest of the Script
Caveats
19. Building Web Sites with Mason
What Is Mason?
SSI Redux
Form Versus Function
Installation
Building a Dynamic Site
Headers and Footers
Passing Parameters
Default Handlers and XML
Accessing MySQL
What Now?
20. Surreal HTML
How It Works
Prompting the User
Fetching the Document
Running the Travesty Algorithm
Printing the Mangled Document
21. Web Page Tastefulness
How It Works
The <BASE> Tag
For Extra Credit
22. Summarizing Web Pages with HTML::Summary
CS-Web: A Search Engine for Canon’s Web Space
META Tags
Basic Summarization Methods
HTML::Summary
The Summarization Algorithm
Sentence Splitting
Conclusion
Afterword: Truncating Japanese Text
23. Wireless Surfing with WAP and WML
A Quick Look at WAP
Enabling WAP on Apache
WML Basics
WAP Cards
Developing WAP Applications
CGI::WML
A Small File Browser with CGI::WML and mod_perl
Generating WML with HTML::Mason
A WML Phone Directory with Mason
WML with Straight Perl
A Remote Control for Home Automation
Creating a Personal Portal
II. Graphics
24. Web Plots with Gnuplot
Using Gnuplot
Parsing Log Files
Putting It All Together
Simple Things Made Easy
25. GD-Graph3d
Using GD-Graph3d
What the Future Holds
Installing GD
26. GD and L-Systems
GD
L-Systems
Turtles
A Turtle Draws a Tree
Putting L-Systems to Work
Leaves
Flowers
Bringing It All Together
Resources
27. OpenGL
Back to Basics
Graphical Primitives
The Vertex
The Line
The Polygon
Drawing on the Screen
The Viewport
The View Frustum
Perspective
Rendering Pipelines
Introduction to OpenGL
OpenGL and Perl
Creating a Viewport
Creating the View Frustum
Drawing Objects
Some Viewport Tricks
Viewport Resize Issues
Resources
References
Acknowledgments
28. Ray Tracing
Technique
Make It Faster
Mathematics
The Program
The Input
The Output
Internals
Other Directions
29. Perl and the Gimp
Using the Gimp
Getting the Tools
Using the Gimp Module
Moving On
30. Glade
GTK+/Gnome
Perl and GTK+/Gnome
Glade
Installation
Designing an Interface
Adding Code
Saving and Building the Project
Writing the Signal Handler Code
Inheritance as a GUI Development Tool
Further Exploration
More Information
31. Gnome Panel Applets
Gnome
Program Overview
Initialization
The Callbacks
Conclusion
Afterword
32. Capturing Video in Real Time
Video::Capture::V4l
Part I: Video Capturing
Capturing Frames in a Loop
Channels, Tuners, and Audio and Picture Settings
Magic Constants for Frequencies?
Example: Image Sequence Detection
Example: Real Time Video Capturing
Part II: The Vertical Blanking Interval
Standards
Decoding VPS
The Autotune Script
Decoding Videotext
References
III. Perl/Tk
33. A Perl/Tk Roadmap
Understand the Basics
Ignore What You Don’t Need
34. Getting Started with Perl/Tk
Perl/Tk Programming
A Sample Perl/Tk Program: plop
Improving plop
35. Scoreboard: A 15-Minute Perl/Tk Application
The Need
The Design
The Implementation
36. The Mouse Odometer
Measuring Distance
Menus
The ColorEditor Widget
Composite Widgets
37. Events
Timer Events
I/O Events
Idle Events
Pong
Miscellaneous Event Commands
38. The Pack and Grid Geometry Managers
A Brief Look at the Packer
The Gridder
39. Drawing on a Canvas
Our Mower Is Programmable!
A Canvas Widget Is the Lawn
Defining the Perl Mowing Module
Zero Turning Radius, Take One
The Canvas Line Item Type
Zero Turning Radius, Take Two
Rotating Simple Objects in Canvas Space
The Canvas Rectangle and Text Item Types
The Canvas Arc Item Type
Nonzero Turning Radius, Take One
Canvas Tags
Scaling Canvas Items
The Real World Is Uncertain
40. Displaying Databases with the Tree Widget
Using Databases from Perl
Overview of the tkdb Application
Building the Graphical Interface
Creating a Tree View of a Database
Making Changes to a Database
The Tk::Error Subroutine
Index
Colophon
SPECIAL OFFER: Upgrade this ebook with O’Reilly
← Prev
Back
Next →
← Prev
Back
Next →