☺唐鳳☻ > Template-Extract > Template::Extract::Compile

Download:
Template-Extract-0.40.tar.gz

Dependencies

Annotate this POD (1)

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.40   Source   Latest Release: Template-Extract-0.41

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, 2005 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

syntax highlighting: