Text::Xslate::Bridge::FillInForm::Lite - HTML::FillInForm::Lite 'fillinform' for Text::Xslate
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> : }
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)
Text::Xslate, HTML::FillInForm::Lite, Dancer::Template::Xslate
Yoshihiro Sasaki, <ysasaki at cpan.org>
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.
To install Text::Xslate::Bridge::FillInForm::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Xslate::Bridge::FillInForm::Lite
CPAN shell
perl -MCPAN -e shell install Text::Xslate::Bridge::FillInForm::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.