I know nothing about mod_perl. Nothing at all! But...

Beyond that, if you really need a macro facility, there are several possibilities:

  1. The highly deprecated and discouraged -P option (see perlrun)

    This probably wouldn't work with mod_perl?

  2. The alternative to -P mentioned in perlrun, Filter::cpp.
  3. The universally disliked possibility of a custom source filter using Filter::Simple or Filter::Util::call packages.
  4. Using a preprocessor as a part of your "build" process. That could be the C preprocessor or a dedicated tool like m4.

Note: I'm not recommending you use any of these--indeed, from what information you've posted it is hard to see how a macro facility would benefit you in any significant way--but it is good to have the information available even if only that you can make your own mind up with good conscience.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

In reply to Re: best way to inline code? (i.e. macro) by BrowserUk
in thread best way to inline code? (i.e. macro) by ManFromNeptune

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.