in reply to Re^3: Embedding pod in C
in thread Embedding pod in C
I think you are asking for trouble, unless you come up with a more comprehensive approach.I can't be much less comprehensive than I have been up to now. This seems as good a place as any to start the thread. Yes, I expect to use a preprocessor (of my own, nothing to do with C's) to extract the pod. Suppose we assume input of the formIf nobody has such a thing already, I suppose you will be designing it. I look forward to that thread!
or#ifdef pod (plain old pod here) #endif /* pod */
The latter has the advantage over #ifdef of allowing the first line of pod to share the line with the "pod opener", but I'm less pleased with the way it terminates the block. I'd like to hear opinions. In either case, we can easily identify the start and end of the pod. Suppose we take everything in between and eliminate all leading white space. This leaves something the pod processors will like. This leaves the problem of preserving leading white space when a verbatim paragraph is desired. We could accommodate that by adding a bit of "faux pod" (a term I should copyright) like/* pod first line of pod (plain old pod here) pod */
where we could preprocess out the =v (and a single space, so we don't run afoul of some real pod directive?), and leave everything that follows untouched. No need for a final =cut, we could supply it automatically when we hit the pod terminator, or just omit it altogether, since the preprocessor is only gathering pod, so there's no need to drop "in and out".=v leave =v this stuff =v alone
Thread begun. Comments?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Embedding pod in C
by John M. Dlugosz (Monsignor) on May 18, 2011 at 18:49 UTC |