Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Text-Tmpl
perl-Text-Tmpl.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Text-Tmpl.spec of Package perl-Text-Tmpl
# # spec file for package perl-Text-Tmpl # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # Name: perl-Text-Tmpl Version: 0.33 Release: 1 License: Distributable, see LICENSE %define cpan_name Text-Tmpl Summary: Templating system perl library Url: http://search.cpan.org/dist/Text-Tmpl/ Group: Development/Libraries/Perl #Source: http://www.cpan.org/authors/id/D/DL/DLOWE/Text-Tmpl-%{version}.tar.gz Source: %{cpan_name}-%{version}.tar.gz BuildRequires: perl BuildRequires: perl-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build %{perl_requires} %description Design goals simplicity, reusability, speed, complete separation of logic from formatting. Feature set variables, loops, conditionals, extensibility of tags, includes, arbitrary delimiters. Usage For starters, make sure you 'use Text::Tmpl'. Each function is described below: * *new* This function initializes the library. It allocates and returns the "global" context structure, and also configures all of the default tag behavior. * *set_delimiters* This function lets you change the delimiters marking the beginning and end of a tag (by default, these are "<!--#" and "-->"), for the specified context. * *set_value* This function stores the name=value pair in the current context. * *set_values* This function dumps the name=value pairs from a hash reference into the current context. * *set_debug* This function turns debugging output on or off. Note that debugging output hasn't been written yet - this is just a placeholder. * *set_strip* This function enables or disables the newline stripping feature. If enabled, the parser removes a single newline (if present) from after any tag. * *set_dir* This function sets the directory where templates will be sought, both by parse_file and by the include tag. Search order is always current directory then this searched directory. This directory must contain all the necessary punctuation so that appending a filename to it produces a valid path (On unix systems, you have to include the trailing slash on the directory name). * *loop_iteration* This function adds an iteration to the loop named loop_name, and returns a unique context for that loop iteration. * *fetch_loop_iteration* This function retrieves and returns the context for $iteration_number from the loop named $loop_name. * *parse_file* This function opens $template_filename, and parses the contents of that file as a template, returning the output. * *parse_string* This function parses template directly, in the same way that Text::Tmpl::parse_file does. * *register_simple* This function registers a new simple tag named $name, which when encountered will cause the parser to call $coderef. See template_extend(1) for the gory details. * *register_pair* This function registers a new tag pair $open_name/$close_name, which when encountered will cause the parser to call $coderef. See template_extend for the gory details. * *alias_simple* This function copies the definition of a simple tag, previously registered as $old_name, to also be called by $new_name. * *alias_pair* This function copies the definition of a tag pair, previously registered as $old_open_name/$old_close_name, to also be called by $new_open_name/$new_close_name. * *remove_simple* This function removes the simple tag $name. * *remove_pair* This function removes the tag pair whose open tag is $open_name. * *errno* This function returns the error number of the last error - see the RETURN VALUES section below. * *strerror* This function returns a string describing the last error - see the RETURN VALUES section below. %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %clean %{__rm} -rf %{buildroot} %files -f %{name}.files %defattr(644,root,root,755) %doc Changes CREDITS LICENSE README TODO %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