NAME

Top Close Open

Template::TT3::Tag::Comment - comment tags

SYNOPSIS

Top Close Open
use Template::TT3::Scanner;
use Template::TT3::Tag::Comment;

my $tag = Template::TT3::Tag::Comment->new(
    start => '[#',
    end   => '#]',
);

my $scanner = Template::TT3::Scanner->new(
    tagset => {
        comment => $tag
    }
);

my $tokens = $scanner->scan($some_text);

DESCRIPTION

Top Close Open

This module is a subclass of Template::TT3::Tag which implements the TT3 comment tag.

[# this is a comment tag #]

METHODS

Top Close Open

The following methods are defined in addition to those inherited from the Template::TT3::Tag::Inline , Template::TT3::Tag , Template::TT3::Base and Badger::Base base classes.

tokenise($input,$output)

Top Close Open

Custom tokenisation method for scanning comment tags. The start token for the comment tag is the last token in $output when this method is called. It scans to the end of the comment tag and appends the comment to the end of the start tag token. It then changes the start token type to be a comment.

AUTHOR

Top Close Open

Andy Wardley http://wardley.org/

COPYRIGHT

Top Close Open

Copyright (C) 1996-2009 Andy Wardley. All Rights Reserved.

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


http://tt3.template-toolkit.org/docs/Template/TT3/Tag/Comment.pm last modified 2009-12-04 07:45:50