From 8554ce273cd24bcef738ebf76aeaa79db87403e1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 9 Dec 2014 09:48:58 +0100 Subject: [PATCH] Bug 6679: (follow-up) fix 9 perlcritic violations in C4/TmplTokenType.pm Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- C4/TmplToken.pm | 2 +- C4/TmplTokenType.pm | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/C4/TmplToken.pm b/C4/TmplToken.pm index 05648cea55..9bd959d821 100644 --- a/C4/TmplToken.pm +++ b/C4/TmplToken.pm @@ -92,7 +92,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'}}; diff --git a/C4/TmplTokenType.pm b/C4/TmplTokenType.pm index a08c718924..aaae86d70f 100644 --- a/C4/TmplTokenType.pm +++ b/C4/TmplTokenType.pm @@ -83,15 +83,15 @@ sub to_string { return $this->{'name'} } -sub TEXT { $_text } -sub TEXT_PARAMETRIZED { $_text_parametrized } -sub CDATA { $_cdata } -sub TAG { $_tag } -sub DECL { $_decl } -sub PI { $_pi } -sub DIRECTIVE { $_directive } -sub COMMENT { $_comment } -sub UNKNOWN { $_unknown } +sub TEXT { $_text } +sub TEXT_PARAMETRIZED { $_text_parametrized } +sub CDATA { $_cdata } +sub TAG { $_tag } +sub DECL { $_decl } +sub PI { $_pi } +sub DIRECTIVE { $_directive } +sub COMMENT { $_comment } +sub UNKNOWN { $_unknown } ############################################################################### -- 2.39.5