bleargh45 / Template-Plugin-StripComments

Template Toolkit filter to strip comment blocks

Home Page:http://metacpan.org/release/Template-Plugin-StripComments/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NAME

Template::Plugin::StripComments - Template Toolkit filter to strip comment blocks

SYNOPSIS

[% USE StripComments %]
...
[% FILTER stripcomments %]
  /* C-style block comments get removed */

  <!-- as do HTML comments -->
[% END %]
...
[% text | stripcomments %]

DESCRIPTION

Template::Plugin::StripComments is a filter plugin for Template::Toolkit, which strips comment blocks from the filtered text.

The following types of comment blocks are stripped:

  • /* c-style comments */
  • <!-- HTML comments -->

METHODS

  • init()

    Initializes the template plugin.

  • filter($text)

    Filters the given text, removing comment blocks as necessary.

AUTHOR

Graham TerMarsch cpan@howlingfrog.com

COPYRIGHT

Copyright (C) 2007, Graham TerMarsch. All Rights Reserved.

This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Template::Plugin::Filter.

About

Template Toolkit filter to strip comment blocks

http://metacpan.org/release/Template-Plugin-StripComments/


Languages

Language:Perl 100.0%