| | 353 | |
| | 354 | =head1 NAME |
| | 355 | |
| | 356 | Text::MicroTemplate |
| | 357 | |
| | 358 | =head1 SYNOPSIS |
| | 359 | |
| | 360 | use Text::MicroTemplate qw(as_html); |
| | 361 | |
| | 362 | # simple form |
| | 363 | my $user = 'John'; |
| | 364 | my $html = eval as_html('hello, <?= $user ?>') |
| | 365 | or die $@; |
| | 366 | |
| | 367 | # complex form |
| | 368 | my $mt = Text::MicroTemplate->new( |
| | 369 | template => 'hello, <?= $query->param('user') ?>, |
| | 370 | ); |
| | 371 | my $code = $mt->code; |
| | 372 | my $builder = eval << "..." or die $@; |
| | 373 | sub { |
| | 374 | my \$query = shift; |
| | 375 | $code->(); |
| | 376 | } |
| | 377 | ... |
| | 378 | $builder->(CGI->new); |
| | 379 | |
| | 380 | =head1 DESCRIPTION |
| | 381 | |
| | 382 | Text::MicroTemplate is a fast, standalone, intelligent template engine based on Mojo::Template. |
| | 383 | |
| | 384 | =head1 SYNTAX |
| | 385 | |
| | 386 | not yet |
| | 387 | |
| | 388 | =head1 METHODS |
| | 389 | |
| | 390 | =head2 as_html |
| | 391 | |
| | 392 | not yet |
| | 393 | |
| | 394 | =head2 new |
| | 395 | |
| | 396 | not yet |
| | 397 | |
| | 398 | =head2 code |
| | 399 | |
| | 400 | not yet |
| | 401 | |
| | 402 | =head2 raw_string |
| | 403 | |
| | 404 | not yet |
| | 405 | |
| | 406 | =head1 AUTHOR |
| | 407 | |
| | 408 | Kazuho Oku E<lt>kazuhooku gmail.comE<gt> |
| | 409 | |
| | 410 | Tokuhiro Matsuno E<lt>tokuhirom AAJKLFJEF GMAIL COME<gt> |
| | 411 | |
| | 412 | The module is based on L<Mojo::Template> by Sebastian Riedel. |
| | 413 | |
| | 414 | =head1 LICENSE |
| | 415 | |
| | 416 | This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10. |
| | 417 | |
| | 418 | =cut |