Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-HTML-Mason
perl-HTML-Mason.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-HTML-Mason.spec of Package perl-HTML-Mason
# # spec file for package perl-HTML-Mason # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name HTML-Mason Name: perl-HTML-Mason Version: 1.60 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: High-performance, dynamic web site authoring system URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(CGI) >= 2.46 BuildRequires: perl(Cache::Cache) >= 1.00 BuildRequires: perl(Class::Container) >= 0.07 BuildRequires: perl(Exception::Class) >= 1.15 BuildRequires: perl(HTML::Entities) BuildRequires: perl(Log::Any) >= 0.08 BuildRequires: perl(Params::Validate) >= 0.70 BuildRequires: perl(Test::More) >= 0.96 Requires: perl(CGI) >= 2.46 Requires: perl(Cache::Cache) >= 1.00 Requires: perl(Class::Container) >= 0.07 Requires: perl(Exception::Class) >= 1.15 Requires: perl(HTML::Entities) Requires: perl(Log::Any) >= 0.08 Requires: perl(Params::Validate) >= 0.70 %{perl_requires} %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. %prep %autosetup -n %{cpan_name}-%{version} find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes CODE_OF_CONDUCT.md CONTRIBUTING.md CREDITS README.md samples UPGRADE %license LICENSE %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor