Chapter 19. Building Web Sites with Mason

Joe Johnston


When this introduction to HTML::Mason was first published, Version 0.80 was the state of the art. The examples in this article still work under the current version, 1.04. I have corrected the anachronisms where possible and note them when not.

The scene: a dusty afternoon in a rickety one horse town. The sign over the “Last Chance” saloon leans drunkenly forward and tumbleweed skips lazily across your path. You’ve fought your way through seven ambushing web projects and just barely escaped to tell about them. To your left, a shifty-eyed city slicker named ASP hawks his miracle invention to eliminate work-a-day web drudgery. To your right, a young, ruddy-faced preacher thumps his ham fist righteously on his leather bound Cold Fusion manual. All around you, the young and blind pound the dry earth, desperately trying to hold together their company’s legacy home page with NotePad and Frontpage. And staring down at you from the end of the street, is the meanest, neediest, most market-driven web site east of the Mississippi that threatens to eat your lunch.

Yep, there’s no doubt about it. You’re in web country.

What Is Mason?

When the person responsible for designing an appealing web site is different from the person who writes the code to make it happen, traditional hard-wired CGI scripts just get in the way. As a web programmer, you probably don’t have much trouble adding print statements to spew HTML. But every time the designer ...

Get Web, Graphics & Perl/Tk Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.