Bug 6679: (follow-up) fix 9 perlcritic violations in C4/TmplTokenType.pm
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 9 Dec 2014 08:48:58 +0000 (09:48 +0100)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 05:06:23 +0000 (05:06 +0000)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
C4/TmplToken.pm
C4/TmplTokenType.pm

index 05648ce..9bd959d 100644 (file)
@@ -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 =~ /^<input\b/is)? $_: ()}
            @{$this->{'_kids'}};
index a08c718..aaae86d 100644 (file)
@@ -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 }
 
 ###############################################################################