Module::Install::MicroTemplate - rendering template automatically
use inc::Module::Install; render_mt 'Foo.xs.mt' => 'Foo.xs';
This module allows you can write XS code in DRY policy by Text::MicroTemplate.
In some time, you want to preprocess your XS code, like following:
void set_user(const char * s) foo_set_user(s) void set_password(const char * s) foo_set_password(s)
I want to write like following:
? for my $v (qw/user password/) { void set_<?= $v ?>(const char * s) foo_set_<?= $v ?>(s) ? }
Of course, you can use this module for any file other than XS =)
Render the template $src using Text::MicroTemplate and write to $dst.
Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>
Text::MicroTemplate
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Module::Install::MicroTemplate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Install::MicroTemplate
CPAN shell
perl -MCPAN -e shell install Module::Install::MicroTemplate
For more information on module installation, please visit the detailed CPAN module installation guide.