I'm happy to announce the availability of Template::Extract 0.20 on CPAN.
It is also available here:

    http://aut.dyndns.org/dist/Template-Extract-0.20.tar.gz
    MD5 (Template-Extract-0.20.tar.gz) = a92423e364bb3b03645151fac9e0bb7d

It can take a TT2-rendered document and its template together, and get the
original data structure back, effectively reversing the process() function.
Here is a short description written by Simon Cozens on his blog:

    Template::Extract is like Template backwards in time. It can take the
    output and the template, and give you the data structure. That's
    right - now in order to parse anything at all, you can create a
    Template Toolkit template which would generate it, run it through
    Template::Extract, and presto, it's parsed.

This version now supports [% foo.bar %] and nested [% FOREACH %]; the regex
printed under debug mode is also much more robust.

If you need to parse or scrap complex data structures and cannot wait
for Perl6::Rules, maybe Template::Extract is the right tool for you.

Suggestions and feedbacks are most welcome.

Thanks,
/Autirjus/

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to