-
Chapter 1 Introduction
-
A First Example
-
The Main Features of Mason
-
Alternatives to Mason
-
Philosophy
-
Getting Started with Mason
-
-
Chapter 2 Components
-
Mason from 10,000 Feet
-
Core Concepts
-
Basic Component Syntax
-
Component Arguments
-
Component Return Values
-
Special Globals
-
Sample Component
-
-
Chapter 3 Special Components: Dhandlers and Autohandlers
-
Dhandlers
-
Autohandlers
-
Using Autohandlers and Dhandlers Together
-
-
Chapter 4 APIs
-
Request Class and Object API
-
Component Object API
-
Buffers
-
-
Chapter 5 Advanced Features
-
Subcomponents
-
Creating Components on the Fly
-
Sharing Data Among Component Sections
-
Methods and Attributes
-
Calling Components with Content Blocks
-
Advanced Inheritance
-
Subrequests
-
-
Chapter 6 The Lexer, Compiler, Resolver, and Interpreter Objects
-
Passing Parameters to Mason Classes
-
The Lexer
-
The Compiler
-
The Resolver
-
The Interpreter
-
-
Chapter 7 Using Mason with mod_perl
-
Configuring Mason
-
Document Root Versus the Component Root
-
Not OK
-
$r
-
ApacheHandler Parameters
-
To Autoflush or Not to Autoflush
-
Generating Something Besides HTML
-
Apache::Status and Mason
-
-
Chapter 8 Building a Mason Site
-
Functionality
-
Directory Layout
-
File Extensions
-
Apache Configuration
-
The Components
-
Components with Access Controls
-
All Done
-
Further Directions
-
-
Chapter 9 Mason and CGI
-
CGI-Appropriate Situations
-
CGI-Inappropriate Situations
-
Creating a CGI-Based Site in Mason
-
Using Mason Templates Inside Regular CGI Scripts
-
Differences Between Mason Under CGI and mod_perl
-
-
Chapter 10 Scalable Design
-
Modules Versus Components
-
Components as Independent Units
-
Component Layout
-
File Naming and Directory Layout
-
Random Advice
-
-
Chapter 11 Recipes
-
Sessions
-
Making Use of Autoflush
-
User Authentication and Authorization
-
Co-Branding Color Schemes
-
Developer Environments
-
Using Mason Outside of Dynamic Web Sites
-
-
Chapter 12 Custom Mason Subclasses
-
Class::Container as a Superclass
-
Syntax: Your Very Own Lexer
-
Output: Compiling to a Different Output
-
Storage: Replacing the Resolver
-
Request: A Request Object with a Built-in Session
-
Argument Munging: ApacheHandler
-
More Reader Exercises
-
-
Appendix A The Mason API
-
Interpreter
-
Request
-
Component
-
Resolver
-
ApacheHandler
-
CGIHandler
-
Compiler
-
Lexer
-
-
Appendix B Object Constructor Parameters
-
HTML::Mason::Interp
-
HTML::Mason::Request
-
HTML::Mason::Resolver::File
-
HTML::Mason::ApacheHandler
-
HTML::Mason::Compiler
-
HTML::Mason::Component
-
HTML::Mason::Buffer
-
HTML::Mason::CGIHandler
-
HTML::Mason::Lexer
-
-
Appendix C Text Editors That Understand Mason
-
Emacs
-
Vim
-
-
Appendix D Content Management with Bricolage
-
Installing Bricolage
-
Elements: the Building Blocks of Content
-
Content Editing
-
Templates
-
Where to Learn More
-
-
Glossary
-
Colophon
- Title:
- Embedding Perl in HTML with Mason
- By:
- Dave Rolsky, Ken Williams
- Publisher:
- O'Reilly Media
- Formats:
-
- Safari Books Online
- Print Release:
- October 2002
- Pages:
- 320
- Print ISBN:
- 978-0-596-00225-1
- | ISBN 10:
- 0-596-00225-4
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Embedding Perl in HTML with Mason is a Hamadryas (Arabian) baboon. This species inhabits the dry plains and rocky hills of northern Africa and the Arabian Peninsula. Though their primary diet consists of roots, seeds, and fruit, Hamadryas baboons also eat insects and small animals, including other monkeys. They travel and forage in bands of 50 to 100 during the day and gather in troops as large as 750 to sleep on steep-sided cliffs during the night. All adults have long, dense, silky fur that is gray in males and brownish in females. Mature males weigh an average of 45 pounds and have a silver cape or mane over the head, neck, and shoulders. Females are considerably smaller and have no mane.
Arabian baboons live in a highly developed social order based on harem groups-- a single adult male is accompanied by up to four females and their offspring. Males control their family by brute force, often biting females on the nape of the neck. Their powerful canines are also bared to threaten predators, which include leopards, jackals, hyenas, cheetahs, and lions. When facing an attack, they may yawn, slap their hands and feet, scream, and alert other baboons with a dog-like bark. They are fierce combatants, often winning fights against animals larger than themselves.
Ancient Egyptian artwork frequently pictures Hamadryas baboons as attendants of Thoth, scribe of the gods, and himself the god of wisdom, learning, and magic. The Egyptians recognized the intelligence of "sacred" baboons and reportedly trained them to wait on tables, pluck weeds from garden plots, and assume positions of prayer when in a temple. They also helped make wine; tomb paintings depict them harvesting grapes and using their own body weight to increase the tension of wine presses. Today these baboons are listed as a threatened species, and they no longer inhabit Egypt. Cultivation and development have destroyed much of their natural habitat and forced some bands to rely on crops and garbage dumps for food. Philip Dangler was the production editor for Embedding Perl in HTML with Mason. Norma Emory was the copyeditor. TIPS Technical Publishing, Inc. provided production services and wrote the index. Emily Quill and Mary Anne Weeks Mayo provided quality control.
Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from Animal Creation. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.
David Futato designed the interior layout. This book was converted to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is Lucas-Font's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. This colophon was written by Philip Dangler.
