Are you looking for a setup like: "Here's a template. Apply it with parameter set 'A' and it will produce perl script 'template_A.pl'; apply it with parameter set 'B' and it will produce perl script 'template_B.pl', ..." ?
That strikes me as being not the best way to capture generalities (or provide a layer of abstraction) across some set of related programming tasks. A properly abstracted solution to a set of related problems would be a single script or module that uses an appropriate set of user-selectable parameters to control its behavior in different contexts, and/or to produce different outputs depending on the user's needs in a given instance.
(Admittedly, "code factory" solutions do have their place, but I don't normally associate those with "templates". Of course, I don't use dynamic code generation all that often, so I'm probably not the best source for advice on that.)
Maybe you should explain your actual goals in a bit more detail?
In reply to Re: Templatize Repeated code
by graff
in thread Templatize Repeated code
by narainhere
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |