Re: CPP-style #includes in POD

2009-05-28 Thread David Cantrell
On Wed, May 27, 2009 at 11:15:19AM +0200, nadim khemir wrote:
 On Thursday 21 May 2009 16.26.48 David Cantrell wrote:
  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?
 As rjbs wrote, this is something to do while building your module. any 
 pre-processor would work.

Yes, that's what I ended up doing, at 'make dist' time.  There's a
complete write-up of what I did here:
  http://www.cantrell.org.uk/david/journal/index.pl/id_pod-includes

It's ugly, but it works.  I may at some point bundle it all up into
something that other people can use easily.

-- 
David Cantrell | top google result for topless karaoke murders

 In My Egotistical Opinion, most people's ... programs should be
  indented six feet downward and covered with dirt. 
  --Blair P. Houghton


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