Dear Monks
I have to generate three versions of a directory structure and a number of ASCII files. For each version of the structure the ASCII files are slightly different. I first approached this by reusing some code I wrote in the past. I use heredocs as templates and Perl interpolation to populate them with the correct values. I also use some external ASCII files as templates and process them with some Perl code.
The script works as intended but now it has grown to 2500 lines and I begin to regret the approach. A better solution is obviously to use separate ASCII template files for everything and get rid of the heredocs altogether. I have looked on CPAN but I see about a zillion template modules.
I just need something simple. Replace some values in ASCII files. The template toolkit looks like overkill, maybe Text::Template or Text::Template::Simple? I’m a bit overwhelmed by the number of template modules.
Anybody out there having (good) experience with a simple CPAN template module?
Cheers dHarry
In reply to Wanted, template module by dHarry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |