Inline::TT - use TT BLOCK as your Perl sub
use Inline 'TT'; print add(args => [ 0, 1 ]); # 1 print rubyish(str => "Just another Perl Hacker"); # "Just/another/Ruby/hacker" __END__ __TT__ [% BLOCK add %] [% result = 0 %] [% FOREACH arg = args %] [% result = result + arg %] [% END %] [% result %] [% END %] [% BLOCK rubyish %] [% strings = str.split(' ') strings.2 = "Ruby" %] [% strings.join('/') %] [% END %]
Template-Toolkit is not just a Templating Engine. It's a language. Yep, Inline::TT is a Inline plugin to allow you to code your Perl subs in TT.
Original idea by IKEBE Tomohiro <ikechin@0xfa.com>
Code implemented by Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Template, Inline
To install Inline::TT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Inline::TT
CPAN shell
perl -MCPAN -e shell install Inline::TT
For more information on module installation, please visit the detailed CPAN module installation guide.