initial package
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-HTML-Template-Compiled?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
3
HTML-Template-Compiled-0.95.tar.gz
Normal file
3
HTML-Template-Compiled-0.95.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:448e576419040c0a462bac1794c12f2cd177534738d31d850960a4fa2d938e1a
|
||||
size 98871
|
6
perl-HTML-Template-Compiled.changes
Normal file
6
perl-HTML-Template-Compiled.changes
Normal file
@@ -0,0 +1,6 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun May 1 10:34:37 UTC 2011 - coolo@opensuse.org
|
||||
|
||||
- initial package 0.95
|
||||
* created by cpanspec 1.78.04
|
||||
|
112
perl-HTML-Template-Compiled.spec
Normal file
112
perl-HTML-Template-Compiled.spec
Normal file
@@ -0,0 +1,112 @@
|
||||
#
|
||||
# spec file for package perl-HTML-Template-Compiled (Version 0.95)
|
||||
#
|
||||
# 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-HTML-Template-Compiled
|
||||
Version: 0.95
|
||||
Release: 1
|
||||
License: GPL+ or Artistic
|
||||
%define cpan_name HTML-Template-Compiled
|
||||
Summary: Template System Compiles HTML::Template files to Perl code
|
||||
Url: http://search.cpan.org/dist/HTML-Template-Compiled/
|
||||
Group: Development/Libraries/Perl
|
||||
Source: http://www.cpan.org/authors/id/T/TI/TINITA/%{cpan_name}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: perl(Module::Build)
|
||||
Recommends: perl(URI::Escape)
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
For a quick reference, see the HTML::Template::Compiled::Reference manpage.
|
||||
|
||||
As the basic features work like in the HTML::Template manpage, please get
|
||||
familiar with this documentation before.
|
||||
|
||||
HTML::Template::Compiled (HTC) does not implement all features of the
|
||||
HTML::Template manpage, and it has got some additional features which are
|
||||
explained below: the "ADDITIONAL FEATURES" manpage
|
||||
|
||||
HTML::Template::Compiled (HTC) is a template system which uses the same
|
||||
template syntax as HTML::Template and the same perl API (see the
|
||||
"COMPATIBILITY" manpage for what you need to know if you want (almost) the
|
||||
same behaviour). Internally it works different, because it turns the
|
||||
template into perl code, and once that is done, generating the output is
|
||||
much faster than with HTML::Template (3-7 times at the moment, depending on
|
||||
the options you use (see the "BENCHMARKS" manpage for some examples), when
|
||||
both are run with loop_context_vars 0. It also can generate perl files so
|
||||
that the next time the template is loaded it doesn't have to be parsed
|
||||
again. The best performance gain is probably reached in applications
|
||||
running under mod_perl, for example.
|
||||
|
||||
If you don't use any caching HTC will be very slow, slower than TT. Also
|
||||
with file caching but without memory caching it's the slowest templating
|
||||
module I know. With memory caching, though, it is one of the fastest, even
|
||||
faster sometimes (depending on options and template size) than C modules.
|
||||
|
||||
You might want to use the HTML::Template::Compiled::Lazy manpage for CGI
|
||||
environments as it doesn't parse the template before calling output. But
|
||||
note that HTC::Lazy isn't much tested, and I don't use it myself, so
|
||||
there's a lack of experience. If you use it and have problems, please
|
||||
report.
|
||||
|
||||
HTC will use a lot of memory because it keeps all template objects in
|
||||
memory. If you are on mod_perl, and have a lot of templates, you should
|
||||
preload them at server startup to be sure that it is in shared memory. At
|
||||
the moment HTC is not fully tested for keeping all data in shared memory
|
||||
(e.g. when a copy-on-write occurs), but it seems like it's behaving well.
|
||||
For preloading you can now use HTML::Template::Compiled->preload($dir).
|
||||
|
||||
Generating code, writing it on disk and later eval() it can open security
|
||||
holes, for example if you have more users on the same machine that can
|
||||
access the same files (usually an http server running as 'www' or
|
||||
'nobody'). See the "SECURITY" manpage for details what you can do to safe
|
||||
yourself.
|
||||
|
||||
NOTE: If you don't need any of the additional features listed below and if
|
||||
you don't need the speed (in many cases it's probably not worth trading
|
||||
speed for memory), then you might be better off with just using
|
||||
HTML::Template.
|
||||
|
||||
NOTE2: If you have any questions, bug reports, send them to me and not to
|
||||
Sam Tregar. This module is developed by me at the moment, independently
|
||||
from HTML::Template, although I try to get most of the tests from it
|
||||
passing for HTC. See the "RESOURCES" manpage for current information.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
|
||||
%build
|
||||
%{__perl} Build.PL installdirs=vendor
|
||||
./Build build flags=%{?_smp_mflags}
|
||||
|
||||
%check
|
||||
./Build test
|
||||
|
||||
%install
|
||||
./Build install destdir=%{buildroot} create_packlist=0
|
||||
%perl_gen_filelist
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes examples README
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user