No subject


Fri Jul 29 16:50:56 CEST 2011


templates to Perl code and save them to disk for subsequent use (i.e.<br>
cache persistence). The COMPILE_EXT option may be provided to specify a<br>
filename extension for compiled template files. It is undefined by<br>
default and no attempt will be made to read or write any compiled<br>
template files.<br>
<br>
 =C2=A0 =C2=A0my $template =3D Template-&gt;new({<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0COMPILE_EXT =3D&gt; &#39;.ttc&#39;,<br>
 =C2=A0 =C2=A0});<br>
<br>
If COMPILE_EXT is defined (and COMPILE_DIR isn&#39;t, see below) then<br>
compiled template files with the COMPILE_EXT extension will be written<br>
to the same directory from which the source template files were loaded.<br>
<br>
Compiling and subsequent reuse of templates happens automatically<br>
whenever the COMPILE_EXT or COMPILE_DIR options are set. The Template<br>
Toolkit will automatically reload and reuse compiled files when it finds<br=
>
them on disk. If the corresponding source file has been modified since<br>
the compiled version as written, then it will load and re-compile the<br>
source and write a new compiled version to disk.<br>
<br>
This form of cache persistence offers significant benefits in terms of<br>
time and resources required to reload templates. Compiled templates can<br>
be reloaded by a simple call to Perl&#39;s require(), leaving Perl to handl=
e<br>
all the parsing and compilation. This is a Good Thing.<br>
<font color=3D"#888888">--<br>
Paul POULAIN<br>
<a href=3D"http://www.biblibre.com" target=3D"_blank">http://www.biblibre.c=
om</a><br>
Expert en Logiciels Libres pour l&#39;info-doc<br>
Tel : (33) 4 91 81 35 08<br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href=3D"mailto:Koha-devel at lists.koha-community.org">Koha-devel at lists.koh=
a-community.org</a><br>
<a href=3D"http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-de=
vel" target=3D"_blank">http://lists.koha-community.org/cgi-bin/mailman/list=
info/koha-devel</a><br>
website : <a href=3D"http://www.koha-community.org/" target=3D"_blank">http=
://www.koha-community.org/</a><br>
git : <a href=3D"http://git.koha-community.org/" target=3D"_blank">http://g=
it.koha-community.org/</a><br>
bugs : <a href=3D"http://bugs.koha-community.org/" target=3D"_blank">http:/=
/bugs.koha-community.org/</a><br>
</font></blockquote></div><br>

--001485eafdb646527904b3a987e4--


More information about the Koha-devel mailing list