Jump to ratings and reviews
Rate this book

Embedding Perl in HTML with Mason

Rate this book
Mason doesn't aim to be the one true Perl-based templating system for building web sites, but it's led many programmers to abandon their custom solutions when they've seen how much easier using Mason can be. It's a powerful, open source, Perl-based web site development and delivery engine, with features that make it an ideal backend for high load sites serving dynamic content. Mason uses a concept called components: a mix of HTML, Perl, and special Mason commands. These components can be entire web pages, or bits of HTML that can be embedded in top-level components. Shared and reusable, these components greatly simplify site maintenance: when you change a shared component, you instantly change all pages that refer to it. Although using Mason isn't difficult, creating a Mason-based site can be tricky. Embedding Perl in HTML with Mason , written by members of Mason's core development team, shows you how to take advantage of Mason's strengths while avoiding the obstacles that inexperienced users may encounter. Mason's unique features, when used properly, can streamline the design of a web site or application. This concise book covers these features from several angles, and includes a study of the authors' sample site where these features are used. Embedding Perl in HTML with Mason 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. The only book to cover this important tool, Embedding Perl in HTML with Mason is essential reading for any Perl programmer who wants to simplify web site design. Learn how to use Mason, and you'll spend more time making things work, and less time reinventing the wheel.

318 pages, Paperback

First published October 16, 2002

9 people want to read

About the author

Dave Rolsky

5 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
2 (10%)
4 stars
8 (42%)
3 stars
4 (21%)
2 stars
3 (15%)
1 star
2 (10%)
Displaying 1 of 1 review
Profile Image for Evan Dower.
36 reviews1 follower
May 22, 2009
Perl doesn't do much to encourage best practices, and Mason is even worse. I've seen a lot of Mason and it has all been pretty ugly. Also, Mason is a text templating system, not an HTML templating system, so there's nothing to enforce valid output when used for a website. In my experience, Mason components tend to be a disgusting mixture of business logic and presentation logic. You certainly can separate them (please put your business logic in Perl modules), but in practice it doesn't seem to happen. If you must use Mason, there's nothing wrong with this book, but I would encourage you to seek other options.
Displaying 1 of 1 review

Can't find what you're looking for?

Get help and learn more about the design.