++ed by:
SYP KEEDI

2 PAUSE users

Author image ☺唐鳳☻
and 1 contributors

NAME

Template::Extract::Compile - Compile TT2 templates into regular expressions

SYNOPSIS

    use Template::Extract::Compile;

    my $template = << '.';
    <ul>[% FOREACH record %]
    <li><A HREF="[% url %]">[% title %]</A>: [% rate %] - [% comment %].
    [% ... %]
    [% END %]</ul>
    .
    my $regex = Template::Extract::Compile->new->compile($template);

    open FH, '>', 'stored_regex' or die $!;
    print FH $regex;
    close FH;

DESCRIPTION

This module utilizes Template::Parser to transform a TT2 template into a regular expression suitable for the Template::Extract::Run module.

METHODS

new()

Constructor. Currently takes no parameters.

compile($template)

Returns the regular expression compiled from $template.

SEE ALSO

Template::Extract, Template::Extract::Run

AUTHORS

Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Copyright 2004 by Autrijus Tang <autrijus@autrijus.org>.

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

See http://www.perl.com/perl/misc/Artistic.html