Buying Options
Embedding Perl in HTML with Mason
Print $34.95
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £26.99
Add to Cart
What is this?
Description
This book shows you how to create large, complex, dynamically driven web sites that look good and are a snap to maintain. You'll learn how to visualize multiple Mason-based solutions to any given problem and select among them. The book covers the latest line of Mason development 1.1x, which has many new features, including line number reporting based on source files, sub-requests, and easier use as a CGI.
Full Description
Table of Contents
  1. Chapter 1 Introduction

    1. A First Example

    2. The Main Features of Mason

    3. Alternatives to Mason

    4. Philosophy

    5. Getting Started with Mason

  2. Chapter 2 Components

    1. Mason from 10,000 Feet

    2. Core Concepts

    3. Basic Component Syntax

    4. Component Arguments

    5. Component Return Values

    6. Special Globals

    7. Sample Component

  3. Chapter 3 Special Components: Dhandlers and Autohandlers

    1. Dhandlers

    2. Autohandlers

    3. Using Autohandlers and Dhandlers Together

  4. Chapter 4 APIs

    1. Request Class and Object API

    2. Component Object API

    3. Buffers

  5. Chapter 5 Advanced Features

    1. Subcomponents

    2. Creating Components on the Fly

    3. Sharing Data Among Component Sections

    4. Methods and Attributes

    5. Calling Components with Content Blocks

    6. Advanced Inheritance

    7. Subrequests

  6. Chapter 6 The Lexer, Compiler, Resolver, and Interpreter Objects

    1. Passing Parameters to Mason Classes

    2. The Lexer

    3. The Compiler

    4. The Resolver

    5. The Interpreter

  7. Chapter 7 Using Mason with mod_perl

    1. Configuring Mason

    2. Document Root Versus the Component Root

    3. Not OK

    4. $r

    5. ApacheHandler Parameters

    6. To Autoflush or Not to Autoflush

    7. Generating Something Besides HTML

    8. Apache::Status and Mason

  8. Chapter 8 Building a Mason Site

    1. Functionality

    2. Directory Layout

    3. File Extensions

    4. Apache Configuration

    5. The Components

    6. Components with Access Controls

    7. All Done

    8. Further Directions

  9. Chapter 9 Mason and CGI

    1. CGI-Appropriate Situations

    2. CGI-Inappropriate Situations

    3. Creating a CGI-Based Site in Mason

    4. Using Mason Templates Inside Regular CGI Scripts

    5. Differences Between Mason Under CGI and mod_perl

  10. Chapter 10 Scalable Design

    1. Modules Versus Components

    2. Components as Independent Units

    3. Component Layout

    4. File Naming and Directory Layout

    5. Random Advice

  11. Chapter 11 Recipes

    1. Sessions

    2. Making Use of Autoflush

    3. User Authentication and Authorization

    4. Co-Branding Color Schemes

    5. Developer Environments

    6. Using Mason Outside of Dynamic Web Sites

  12. Chapter 12 Custom Mason Subclasses

    1. Class::Container as a Superclass

    2. Syntax: Your Very Own Lexer

    3. Output: Compiling to a Different Output

    4. Storage: Replacing the Resolver

    5. Request: A Request Object with a Built-in Session

    6. Argument Munging: ApacheHandler

    7. More Reader Exercises

  1. Appendix A The Mason API

    1. Interpreter

    2. Request

    3. Component

    4. Resolver

    5. ApacheHandler

    6. CGIHandler

    7. Compiler

    8. Lexer

  2. Appendix B Object Constructor Parameters

    1. HTML::Mason::Interp

    2. HTML::Mason::Request

    3. HTML::Mason::Resolver::File

    4. HTML::Mason::ApacheHandler

    5. HTML::Mason::Compiler

    6. HTML::Mason::Component

    7. HTML::Mason::Buffer

    8. HTML::Mason::CGIHandler

    9. HTML::Mason::Lexer

  3. Appendix C Text Editors That Understand Mason

    1. Emacs

    2. Vim

  4. Appendix D Content Management with Bricolage

    1. Installing Bricolage

    2. Elements: the Building Blocks of Content

    3. Content Editing

    4. Templates

    5. Where to Learn More

  5. Glossary

  6. Colophon

View Full Table of Contents
Product Details
Title:
Embedding Perl in HTML with Mason
By:
Dave Rolsky, Ken Williams
Publisher:
O'Reilly Media
Formats:
  • Print
  • Safari Books Online
Print Release:
October 2002
Pages:
320
Print ISBN:
978-0-596-00225-1
| ISBN 10:
0-596-00225-4
Customer Reviews
About the Authors
  1. Dave Rolsky

    is a programmer, author, and activist with a background in music composition and an obsession with Hong Kong films and the works of author Gene Wolfe. He has been actively developing Free (Perl) Software for several years and is a member of the Mason core development team. For more information about Embedding Perl in HTML with Mason please visit www.masonbook.com, a web site maintained by the authors where additional information and downloadable source code are available.

    View Dave Rolsky's full profile page.

  2. Ken Williams

    is a researcher in Document Categorization at the University of Sydney in Australia. He has written many Perl modules of varying utility, about 20 of which are available on CPAN. Like co-author Dave Rolsky, Ken is a member of the HTML::Mason core development team. His educational background is in mathematics and music. For more information about Embedding Perl in HTML with Mason please visit www.masonbook.com, a web site maintained by the authors where additional information and downloadable source code are available.

    View Ken Williams's full profile page.

Colophon

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.

  • Book cover of Embedding Perl in HTML with Mason