11.9. What We Didn’t Talk About

As with many of the other topics in this book, we could write another volume describing all the features of Mason; we have only scratched the surface here (the 80/20 rule). Although it’s not essential, you may want to explore the following topics as you learn more about how you can develop web sites with Mason.

11.9.1. Tags for Initialization and Cleanup

Mason provides tags that contain blocks of Perl code to be executed at specific times. For details, see www.masonhq.com/docs/manual/Devel.html#initialization_and_cleanup.

The <%cleanup> Tag

The <%cleanup> ... </%cleanup> tag defines a block of code that is executed just before the component exits. For example:

<%cleanup> 
$dbh->disconnect(); 
</%cleanup> 

This ...

Get Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.