Does FIlter-Template approximate what you want? It's a Perl source filter that implements a simple form of code templates. Based on the SYNOPSIS:
use Filter::Template; template max (one,two) { ((one) > (two) ? (one) : (two)) } # Expand the "max" template inline. # Generates and runs code that prints # the largest value of two scalars. print {% max $a, $b %}, "\n";
In reply to Re: How to simulate a preprocessor macro without one?
by rcaputo
in thread How to simulate a preprocessor macro without one?
by AriSoft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |