View on
MetaCPAN
Yoshihiro Sasaki > Text-Xslate-Bridge-FillInForm-Lite-0.01 > Text::Xslate::Bridge::FillInForm::Lite

Download:
Text-Xslate-Bridge-FillInForm-Lite-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source   Latest Release: Text-Xslate-Bridge-FillInForm-Lite-0.03

NAME ^

Text::Xslate::Bridge::FillInForm::Lite - HTML::FillInForm::Lite 'fillinform' for Text::Xslate

SYNOPSIS ^

    use Text::Xslate;
    my $tx = Text::Xslate->new(
        module => ['Text::Xslate::Bridge::FillInForm::Lite'],
    );

    my %vars = (
        q => { foo => "<filled value>" },
    );
    print $tx->render_string($tmpl, \%vars);

    # this is same as below
    use Text::Xslate;
    use HTML::FillInForm::Lite qw(fillinform);

    my $tx = Text::Xslate->new(
        function => { fillinform => html_builder(\&fillinform) },
    );

    # in your template
    : block form | fillinform($q) -> {
    <form action="">
        <input name="foo" type="" tyep="text" />
        <textarea id="" name="bar" rows="10" cols="30"></textarea>
    </form>
    : }

DESCRIPTION ^

Text::Xslate::Bridge::FillInForm::Lite provides fillinform function for Text::Xslate. You can set fillinform function using HTML::FillInForm::Lite by yourself. But you cannot set user defined functions in some situation(e.g. Dancer::Template::Xslate is so)

SEE ALSO ^

Text::Xslate, HTML::FillInForm::Lite, Dancer::Template::Xslate

AUTHOR ^

Yoshihiro Sasaki, <ysasaki at cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2012 by Yoshihiro Sasaki

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

syntax highlighting: