in reply to best way to inline code? (i.e. macro)
Don't know how well it'd play with mod_perl, but you might look at POE::Preprocessor to at least get some ideas.