Perl generate a file based on a template -


i working on use case requires me generate .hpp files based on template.

#ifdef changethis_hpp #define changethis_hpp  #include<fixedheader1> ... #include<fixedheadern>  class changethis { .... }; 

needs generated based on requirement of changethis string. how can achieve in perl?

whitsf wrote fixed template.txt file , and replaced text changethis string , dumped changethis.hpp.

but there other way can achieve in perl?

i use text::template such tasks.


Comments