logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Template::AutoFilter::Parser - parses TT templates and automatically adds filters to tokens

Author

       Christian Walde <walde.christian@gmail.com>

Description

       Sub-class of Template::Parser.

Methods

       See Template::Parser for most of these, documented here are added methods.

   new
       Accepts all the standard Template::Parser parameters, plus some extra:

       AUTO_FILTER

       Accepts a single string, which defines the name of a filter to be applied to all directives omitted from
       the skip list. This parameter defaults to 'html'.

       SKIP_DIRECTIVES

       Allows customization of which Template::Manual::Directives should be exempt from having auto filters
       applied. Expects an array ref of strings.  Default value is the output from
       $self->default_skip_directives.

   split_text
       Modifies token processing by adding the filter specified in AUTO_FILTER to all filter-less interpolation
       tokens.

   has_skip_field
       Checks the field list of a token to see if it contains directives that should be excluded from filtering.

   default_skip_directives
       Provides a reference to a hash containing the default directives to be excluded. Default value is:

           CALL SET DEFAULT INCLUDE PROCESS WRAPPER BLOCK IF UNLESS ELSIF ELSE
           END SWITCH CASE FOREACH FOR WHILE FILTER USE MACRO TRY CATCH FINAL
           THROW NEXT LAST RETURN STOP CLEAR META TAGS DEBUG

   make_skip_directives
       Prebuilds a hash of directives to be skipped while applying auto filters.

Name

       Template::AutoFilter::Parser - parses TT templates and automatically adds filters to tokens

Version

       version 0.143050

See Also