Tatsuhiko, This is simply wonderful. It brings a bright smile to my face!
BTW, TT's author Andy Wardley is a wonderful man. I got to know him at last year's Perl conferences and he even shared his hotel room with me at YAPC::Europe. I consider him a personal friend and one of Perl's finest. If you haven't told him about this yet, please do. He'll absolutely love it! I hope you're going to put it out on CPAN. I know it may seem a joke, but that's how many useful Perl mods get going. I'll keep my eye out for it. Inline::Everything; Brian On 26/04/02 08:03 +0900, Tatsuhiko Miyagawa wrote: > Here's yet another funny Inline plugin - Inline::TT > > TT = Template Toolkit is a Template processing system found at > http://www.tt2.org/ but it has also a really neat and flexible syntax > feature. Thus I Inline'ized it ;) > > Be sure not to use it in production, but you'll find its example code > something interesting ;) > > The code is on http://perlmonks.org/index.pl?node_id=162123 > > =head1 NAME > > Inline::TT - use TT BLOCK as your Perl sub > > =head1 SYNOPSIS > > 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 %] > > =head1 DESCRIPTION > > Template-Toolkit is not just a Templating Engine. It's a > B<language>. Yep, Inline::TT is a Inline plugin to aloow you to code > your Perl subs in TT. > > =head1 AUTHOR > > Original idea by IKEBE Tomohiro E<lt>[EMAIL PROTECTED]<gt> > > Code implemented by Tatsuhiko Miyagawa E<lt>[EMAIL PROTECTED]<gt> > > This library is free software; you can redistribute it and/or modify > it under the same terms as Perl itself. > > =head1 SEE ALSO > > L<Template>, L<Inline> > > =cut
