in reply to Embedding pod in C

I'm not very proficient in C, but AFAIK it's common to use a preprocessor.

Like this you can filter all POD out, which basically means cutting out paragraphs between lines starting with a "=". (Probably you can even delegate this to an existing Perl module)

POD-Interpreters themselves normally don't care what kind of code you weave in.

Cheers Rolf

Replies are listed 'Best First'.
Re^2: Embedding pod in C
by John M. Dlugosz (Monsignor) on May 18, 2011 at 18:55 UTC
    The C preprocessor can't be instructed to do anything of the sort. It uses lines starting with # and does a few simple things only.
      OK.

      I hoped it's at least possible to define macros which translate =POD_COMMANDS to the start and end of multi-line comments.

      Cheers Rolf

        No, it's quite limited. Macro identifiers follow the rules of other identifiers (letters and numbers) and the parameters are in a parenthesis list that follows. Nothing like a general sed or grep replacement mechanism.