pre_delim => qr/\[%/,
post_delim => qr/%\]/,
- token_id => qr/\w+?/,
+ token_re => qr/\w+?/,
greedy_chunk => 0,
# upper_case => 0,
# lower_case => 0,
$self->{scalar_re} = qr{
$self->{pre_delim}
\s* # optional leading whitespace
- ($self->{token_id}) # grab scalar name
+ ($self->{token_re}) # grab scalar name
\s* # optional trailing whitespace
$self->{post_delim}
}xi ; # case insensitive
\s* # optional leading whitespace
START # required START token
\s+ # required whitespace
- ($self->{token_id}) # grab the chunk name
+ ($self->{token_re}) # grab the chunk name
\s* # optional trailing whitespace
$self->{post_delim}
($chunk_body) # grab the chunk body
\s* # optional leading whitespace
INCLUDE # required INCLUDE token
\s+ # required whitespace
- ($self->{token_id}) # grab the included template name
+ ($self->{token_re}) # grab the included template name
\s* # optional trailing whitespace
$self->{post_delim}
}xi ; # case insensitive
by a value looked up in a hash with the token as the key. The hash
lookup keeps the same case as parsed from the token markup. You can
override the regular expression used to match a token with the
-C<token_id> option.
+C<token_re> option.
[% foo %] [%BAR%]
references) and callbacks to user code. By default a chunk will be a
non-greedy grab but you can change that in the constructor by enabling
the C<greedy_chunk> option. You can override the regular expression
-used to match the chunk name with the C<token_id> option.
+used to match the chunk name with the C<token_re> option.
[%Start FOO%]
[% START bar %]
When a markup C<[%include name%]> is seen, that text is replaced by
the template of that name. C<name> is matched with C<\w+?> which is
the name of the template. You can override the regular expression used
-to match the include C<name> with the C<token_id> option.
+to match the include C<name> with the C<token_re> option.
See C<INCLUDE EXPANSION> for more on this.