diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..616f3ce --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +META.yml +Makefile +Makefile.old +MANIFEST.bak +pm_to_blib +blib +*~ +.* +!.gitignore +!.shipit +MYMETA.yml +MYMETA.json diff --git a/Changes b/Changes new file mode 100644 index 0000000..21692bb --- /dev/null +++ b/Changes @@ -0,0 +1,4 @@ +Revision history for Perl extension Text::Xslate::Bridge::FillInForm::Lite. + +0.01 Wed Sep 19 16:47 2012 + - original version; created by h2xs 1.23 with options diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..11b02ee --- /dev/null +++ b/MANIFEST @@ -0,0 +1,6 @@ +Changes +lib/Text/Xslate/Bridge/FillInForm/Lite.pm +Makefile.PL +MANIFEST This list of files +README +t/000_compile.t diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..0c9787f --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,17 @@ +use 5.008_001; +use ExtUtils::MakeMaker; + +WriteMakefile( + NAME => 'Text::Xslate::Bridge::FillInForm::Lite', + VERSION_FROM => 'lib/Text/Xslate/Bridge/FillInForm/Lite.pm', + PREREQ_PM => { + 'Text::Xslate' => 0, + 'HTML::FillInForm::Lite' => 0, + }, + ( $] >= 5.005 + ? ( ABSTRACT_FROM => 'lib/Text/Xslate/Bridge/FillInForm/Lite.pm', + AUTHOR => 'Yoshihiro Sasaki ' + ) + : () + ), +); diff --git a/README b/README new file mode 100644 index 0000000..9405205 --- /dev/null +++ b/README @@ -0,0 +1,39 @@ +Text-Xslate-Bridge-FillInForm-Lite version 0.01 +=============================================== + +The README is used to introduce the module and provide instructions on +how to install the module, any machine dependencies it may have (for +example C compilers and installed libraries) and any other information +that should be provided before the module is installed. + +A README file is required for CPAN modules since CPAN extracts the +README file from a module distribution so that people browsing the +archive can use it get an idea of the modules uses. It is usually a +good idea to provide version information here so that people can +decide whether fixes for the module are worth downloading. + +INSTALLATION + +To install this module type the following: + + perl Makefile.PL + make + make test + make install + +DEPENDENCIES + +This module requires these other modules and libraries: + + Text::Xslate + HTML::FillInForm::Lite + +COPYRIGHT AND LICENCE + +Put the correct copyright and licence information here. + +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. diff --git a/lib/Text/Xslate/Bridge/FillInForm/Lite.pm b/lib/Text/Xslate/Bridge/FillInForm/Lite.pm new file mode 100644 index 0000000..68ec704 --- /dev/null +++ b/lib/Text/Xslate/Bridge/FillInForm/Lite.pm @@ -0,0 +1,61 @@ +package Text::Xslate::Bridge::FillInForm::Lite; + +use 5.008_001; +use strict; +use warnings; +use base qw(Text::Xslate::Bridge); + +use Text::Xslate qw(html_builder); +use HTML::FillInForm::Lite qw(fillinform); + +our $VERSION = '0.01'; + +# copied from Text/Xslate/Manual/Cookbook.pod#Using_FillInForm +__PACKAGE__->bridge( + function => { fillinform => html_builder( \&fillinform ) } ); + +1; +__END__ + +=head1 NAME + +Text::Xslate::Bridge::FillInForm::Lite - HTML::FillInForm::Lite 'fillinform' for Text::Xslate + +=head1 SYNOPSIS + + use Text::Xslate; + + my $tx = Text::Xslate->new( + module => ['Text::Xslate::Bridge::FillInForm::Lite'], + ); + + # this is same as below + use Text::Xslate; + use HTML::FillInForm::Lite qw(fillinform); + + my $tx = Text::Xslate->new( + function => { fillinform => html_builder(\&fillinform) }, + ); + +=head1 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) + +=head1 SEE ALSO + +L, L, L + +=head1 AUTHOR + +Yoshihiro Sasaki, Eysasaki at cpan.orgE + +=head1 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. + +=cut diff --git a/t/000_compile.t b/t/000_compile.t new file mode 100644 index 0000000..0d75c95 --- /dev/null +++ b/t/000_compile.t @@ -0,0 +1,5 @@ +use strict; +use warnings; + +use Test::More tests => 1; +BEGIN { use_ok('Text::Xslate::Bridge::FillInForm::Lite') };