CPP-style #includes in POD

2009-05-21 Thread David Cantrell
One of my distributions is CPAN-FindDependencies.  Most of the magic is
wrapped up in a module, and specifically in the
CPAN::FindDependencies::finddeps function.

There's also a command-line script bundled with it, called cpandeps.
It's doco basically says takes the same parameters as the finddeps
function.  But obviously it would be better to duplicate the doco there
when generating the manpage.

The obvious solution is to have both module and script #include the
appropriate chunk of POD.

So I'm thinking:

=begin cpp
...
=end cpp

has anyone already done this?  And if not, am I correct in thinking that
I need to write Pod::cpp, have that as a pre-req, and basically follow
the recipe in the Pod::Simple::Subclassing doco?

-- 
David Cantrell | Hero of the Information Age

EIN KIRCHE! EIN KREDO! EIN PAPST!


Re: CPP-style #includes in POD

2009-05-21 Thread Ricardo SIGNES
* David Cantrell da...@cantrell.org.uk [2009-05-21T10:26:48]
 The obvious solution is to have both module and script #include the
 appropriate chunk of POD.
 
 So I'm thinking:
 
 =begin cpp
 ...
 =end cpp
 
 has anyone already done this?  And if not, am I correct in thinking that
 I need to write Pod::cpp, have that as a pre-req, and basically follow
 the recipe in the Pod::Simple::Subclassing doco?

This is the sort of thing that I do on the author-side before distributing, and
I do it with Pod::Weaver.  It'd be easy to do with Pod::Eventual, though, too,
and much simpler to learn how.  Basically, you'd use Pod::Eventual::Simple,
turn the document into an event stream, replace the =include event stream with
one from another file, and rewrite it out.

I've generally found Pod::Simple to be too complex for quick hacks because it's
meant to deal with *all* of pod, whereas what I need is usually a much simpler
subset.

-- 
rjbs