Text::Template::Simple::Tokenizer - Tokenizer


Text-Template-Simple documentation  | view source Contained in the Text-Template-Simple distribution.

Index


NAME

Top

Text::Template::Simple::Tokenizer - Tokenizer

SYNOPSIS

Top

   use strict;
   use constant TYPE => 0;
   use constant DATA => 1;
   use Text::Template::Simple::Tokenize;
   my $t = Text::Template::Simple::Tokenize->new( $start_delim, $end_delim );
   my $tokens = $t->tokenize( $raw_data );
   foreach my $token ( @{ $tokens } ) {
      printf "Token type: %s\n", $token->[TYPE];
      printf "Token data: %s\n", $token->[DATA];
   }

DESCRIPTION

Top

This document describes version 0.83 of Text::Template::Simple::Tokenizer released on 9 February 2011.

Tokenizes the input with the defined delimiter pair.

METHODS

Top

new

The object constructor. Accepts two parameters in this order: start_delimiter and end_delimiter.

tokenize

Tokenizes the input 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

Top

Burak Gursoy <burak@cpan.org>.

COPYRIGHT

Top

LICENSE

Top

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.1 or, at your option, any later version of Perl 5 you may have available.


Text-Template-Simple documentation  | view source Contained in the Text-Template-Simple distribution.