The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

DEPRECATED

This module is deprecated. You should use Text::Xslate (ver 1.5018 or higher) and it's html_builder_module option instead. Functions with this option are wrapped by html_builder(). You need to use this module no longer!

    # example for using fillinform
    use Text::Xslate;
    my $tx = Text::Xslate->new(
        html_builder_module => ['HTML::FillInForm::Lite' => ['fillinform']]
    );

See Text::Xslate and Text::Xslate::Manual::Cookbook for more details.

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.