is lame and should be avoided, so I'd certainly prefer a #define there. I doubt it has any significant speed or memory advantages though. It just lets you avoid the syntax traps of the constant
pragma. The #include one seems like a bad idea. If you include that code in more than one place, it will take up more memory. You will also lose the dependency tracking that require gives you.
Also, note that you can do this with a source filter by using the Filter::cpp module.
UPDATE: Why not just use the -P option, instead of a source filter? Well, you mentioned mod_perl. Environments that use a persistent interpreter will often not allow you to do command-line options like -P.