in reply to Re^2: POD not rendering as I intend
in thread POD not rendering as I intend

Omit your typemap from the MANIFEST, and generate it directly from crap.pod in your Makefile.PL or Build.PL script.

open my $in, '<', 'crap.pod' or die "moan crap $!\n"; open my $tmap, '>', 'typemap' or die "typemap $!\n"; while (<$in>) { print $tmap $_ if /^=head1/ .. /=^cut/ and /^[^=]/; } close $in; close $tmap;

Remember that xsubpp will be run much later, and won't care that typemap was created only a few seconds ago, and did not, in fact, come with the original tarball. Just make sure it renders as you want in POD, and remove any POD hackery as you write it out to the typemap file.

Or go the other way: have a POD stub file, and merge in the contents of typemap, appropriately munged.

• another intruder with the mooring in the heart of the Perl

Replies are listed 'Best First'.
Re^4: POD not rendering as I intend
by syphilis (Archbishop) on Oct 14, 2007 at 12:47 UTC
    In a nutshell, what I was after was a way to have perldoc output certain lines without any preceding whitespace. It now seems to me that perldoc puts leading whitespace at the beginning of *every* line of output ... so I don't see that there's any way of really achieving what I wanted. (It'd be nice if I was wrong about that.)

    Cheers,
    Rob
      I don't see that there's any way of really achieving what I wanted

      Well, you can't extract a nail with a Phillips head screwdriver, either. There are many different renderers of POD... use the one that gives you the most suitable results.

      perldoc is a thin wrapper around Pod::Man. You may achieve better results with Pod::Text. The pod2text (which in turn is a wrapper around Pod::Text) has a number of knobs you can twiddle to alter the output. Maybe you'll find something suitable with that.

      • another intruder with the mooring in the heart of the Perl