Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP
by James Lee, Brent Ware
11.1. Introduction
HTML::Mason (aka Mason—see www.masonhq.com/) is a Perl module created by Jonathan Swartz. Its function is similar to Embperl: to include Perl code within an HTML page. The following are some of the features of Mason:
Simple embedded Perl syntax— An HTML file can harness the power of Perl, including variables (scalar, arrays, hashes, etc.), complex data types, and flow-control constructs.
Modular pages with components— Create subroutine-like code, known as components, to generate headers, footers, menus, and so on.
Parameter handling— It provides easy access to GET/POST parameters, including assigning default values and triggering error conditions.
Templates and filters— A template can be created and applied to the entire ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access