X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FTmplToken.pm;h=045269b80b76b40efacb0324a476da60b10a3797;hb=9922d2bf40e2b7429f300d4d73134f9fef3b8c65;hp=a9cccd1105cfbf5add969a0dc8412d24588bc326;hpb=481f620455d40f93a3cb37136ef2c3964497751e;p=koha.git diff --git a/C4/TmplToken.pm b/C4/TmplToken.pm index a9cccd1105..045269b80b 100644 --- a/C4/TmplToken.pm +++ b/C4/TmplToken.pm @@ -1,13 +1,26 @@ package C4::TmplToken; -use strict; -#use warnings; FIXME - Bug 2505 -use C4::TmplTokenType; -require Exporter; +# Copyright Tamil 2011 +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); -############################################################################### +use strict; +use warnings; +use C4::TmplTokenType; =head1 NAME @@ -19,14 +32,7 @@ This is a class representing a token scanned from an HTML::Template .tmpl file. =cut -############################################################################### - -$VERSION = 0.01; -@ISA = qw(Exporter); -@EXPORT_OK = qw(); - -############################################################################### sub new { my $this = shift; @@ -85,7 +91,7 @@ sub set_children { # FIXME: DIRECTIVE is not necessarily TMPL_VAR !! sub parameters_and_fields { my $this = shift; - return map { $_->type == C4::TmplTokenType::DIRECTIVE? $_: + return map { $_->type == C4::TmplTokenType::DIRECTIVE() ? $_: ($_->type == C4::TmplTokenType::TAG && $_->string =~ /^{'_kids'}};