Name : perl-HTML-Mason
| |
Version : 1.60
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.1.1
| Date : 2023-02-12 06:50:34
|
Group : Unspecified
| Source RPM : perl-HTML-Mason-1.60-lp154.1.1.src.rpm
|
Size : 0.89 MB
| |
Packager : https://www_suse_com/
| |
Summary : High-performance, dynamic web site authoring system
|
Description :
Mason is a tool for building, serving and managing large web sites. Its features make it an ideal backend for high load sites serving dynamic content, such as online newspapers or database driven e-commerce sites.
Actually, Mason can be used to generate any sort of text, whether for a web site or not. But it was originally built for web sites and since that\'s why most people are interested in it, that is the focus of this documentation.
Mason\'s various pieces revolve around the notion of \"components\'\'. A component is a mix of HTML, Perl, and special Mason commands, one component per file. So-called \"top-level\" components represent entire web-pages, while smaller components typically return HTML snippets for embedding in top-level components. This object-like architecture greatly simplifies site maintenance: change a shared component, and you instantly changed all dependent pages that refer to it across a site (or across many virtual sites).
Mason\'s component syntax lets designers separate a web page into programmatic and design elements. This means the esoteric Perl bits can be hidden near the bottom of a component, preloading simple variables for use above in the HTML. In our own experience, this frees content managers (i.e., non-programmers) to work on the layout without getting mired in programming details. Techies, however, still enjoy the full power of Perl.
Mason works by intercepting innocent-looking requests (say, http://www.yoursite.com/index.html) and mapping them to requests for Mason components. Mason then compiles the component, runs it, and feeds the output back to the client.
Consider this simple Mason component:
% my $noun = \'World\'; Hello < % $noun %>! How are ya?
The output of this component is:
Hello World! How are ya?
In this component you see a mix of standard HTML and Mason elements. The bare \'%\' prefixing the first line tells Mason that this is a line of Perl code. One line below, the embedded < % ... %> tag gets replaced with the return value of its contents, evaluated as a Perl expression.
Beyond this trivial example, components can also embed serious chunks of Perl code (say, to pull records from a database). They can also call other components, cache results for later reuse, and perform all the tricks you expect from a regular Perl program.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-H/15.4/noarch |