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.
At its heart, Mason is simply a mechanism for embedding Perl code into plain text. It is only one of many such mechanisms that all do more or less the same thing. However, Mason represents a particular set of choices about how this embedding should be done, and many people have found that the way Mason does things is very straightforward and extremely conducive to getting jobs done.
In this chapter we’ll introduce you to some of Mason’s key features and strengths, show you a couple of examples of how to use Mason, and talk about some alternatives to Mason. After reading this chapter, you should have a fairly good idea of how Mason relates to its peers and what kinds of tasks you can accomplish with Mason.
The most common application of Mason is in building large dynamic web sites, and this book focuses mostly on web site building. Mason is broadly applicable to any situation in which fine control over document content is required, however, such as generating mail-merged form letters, creating custom configuration file sets, and even building dynamic GIF images based on varying input parameters. We intend to give you enough facility with Mason that after reading this book, you can imagine Mason-based solutions to problems we haven’t ever thought of.
Before we get into the details of Mason and comparisons with its alternatives, we’ll just briefly mention some of its guiding design principles. Mason was designed to help you build, organize, and maintain large web sites or other groups of dynamically generated documents. It cooperates fully with Perl, leveraging all the solutions and techniques that Perl developers have come to depend on and that have made Perl such a powerful and widespread tool. It encourages thinking about your site in structural terms rather than as a collection of procedural scripts or modules. All of these things are conducive to getting your job done effectively, letting you concentrate on your goals while Mason takes care of the details.
Download free ebook : Oreilly–Embedding_Perl_in_HTML_with_Mason.pdf














