NAME
Text::Template::Simple::Tokenizer - Tokenizer
SYNOPSIS
use strict;
use warnings;
use Text::Template::Simple::Constants qw( :token );
use Text::Template::Simple::Tokenizer;
my $t = Text::Template::Simple::Tokenizer->new( $start_delim, $end_delim );
foreach my $token ( @{ $t->tokenize( $raw_data ) } ) {
printf "Token type: %s\n", $token->[TOKEN_ID];
printf "Token data: %s\n", $token->[TOKEN_STR];
}
DESCRIPTION
This document describes version 0.90
of Text::Template::Simple::Tokenizer
released on 5 July 2016
.
Splits the input into tokens with the defined delimiter pair.
METHODS
new
The object constructor. Accepts two parameters in this order: start_delimiter
and end_delimiter
.
tokenize
Splits the input into tokens with the supplied delimiter pair. Accepts a single parameter: the raw template string.
ESCAPE METHODS
tilde
Escapes the tilde character.
quote
Escapes double quotes.
AUTHOR
Burak Gursoy <burak@cpan.org>.
COPYRIGHT
Copyright 2004 - 2016 Burak Gursoy. All rights reserved.
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.0 or, at your option, any later version of Perl 5 you may have available.