root/lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Output/TT.pm @ 19782

Revision 19782, 451 bytes (checked in by lopnor, 5 years ago)

lang/perl/App-Hachero: more tt friendly result

Line 
1package App::Hachero::Plugin::Output::TT;
2use strict;
3use warnings;
4use base qw(App::Hachero::Plugin::Base);
5use Template;
6use IO::All;
7
8sub output : Hook {
9    my ($self, $context, $args) = @_;
10    my $tt_file = $self->config->{config}->{template};
11    my $out_file = $self->config->{config}->{out};
12    my $tt = Template->new;
13    my $template < io $tt_file;
14    $tt->process(\$template, $context, \my $out);
15    $out > io $out_file;
16}
17
181;
19__DATA__
Note: See TracBrowser for help on using the browser.