NAME Catmandu::Exporter::Template - a TT2 Template exporter SYNOPSIS use Catmandu::Exporter::Template; my $exporter = Catmandu::Exporter::Template->new( fix => 'myfix.txt' xml => 1, template_before => '/header.xml' , template => '/record.xml' , template_after => '/footer.xml' , ); $exporter->add_many($arrayref); $exporter->add_many($iterator); $exporter->add_many(sub { }); $exporter->add($hashref); $exporter->commit; # trigger the template_after printf "exported %d objects\n" , $exporter->count; METHODS new(xml => 0|1 , template_before => PATH, template => PATH , template_after => PATH) Catmandu::Exporter::Template can be used to export data objects using Template Toolkit. The only required argument is 'template' which points to a file to render for each exported object. Set the 'template_before' and 'template_before' to add output at the start and end of the export. Optionally provide an 'xml' indicator to include a XML header. add Add data to the exporter. commit Commit all changes and execute the template_after if given. AUTHOR Nicolas Steenlant CONTRIBUTOR Vitali Peil LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO Catmandu::Exporter, Template