script/podweave.pl untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 14 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 36 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl
2 use strict;
3 use warnings;
4  
5 # Dumb weave, just attach the titles.
6  
7 my ($title);
8 while(<>) {
9 if (/^=begin +literate +\+?(\S.*?)\s*$/) { $title=$1 }
10 elsif(/^=for +literate +target:/) { 1 }
11 elsif(/^=for +literate +\.\s*$/) { 1 }
12 elsif(/^=for +literate +\+?(\S.*?)\s*$/) { $title=$1 }
13 elsif(/^=end +literate/) { 1 }
14 elsif(/^\s*$/) { print }
15 elsif($title&&/^(\s*)\S/) { print "$1< $title >=\n$_"; undef($title) }
16 else { print }
17 }
18