3 # Copyright (C) 2009 LibLime
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 This helper script is invoked by xt/author/valid-templates.t
30 and tests a template for basic syntax errors by having
31 HTML::Template::Pro parse it.
36 use HTML::Template::Pro;
38 my $filename = $ARGV[0];
39 my $include_dir = $ARGV[1];
41 my $template = HTML::Template::Pro->new(
42 filename => $filename,
43 die_on_bad_params => 1,
46 loop_context_vars => 1, # enable: __first__, __last__, __inner__, __odd__, __counter__
47 path => [$include_dir],
50 $template->output; # tossing output
54 Koha Development Team <http://koha-community.org/>
56 Galen Charlton <galen.charlton@liblime.com>