script/podweave.pl untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 16 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 44 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 my ($title);
5 while(<>) {
6 while(/\bC<\s*D<([^>]+)>/) {
7 my $name=$1; $name=~s/^\s*//; $name=~s/\s*$//;
8 s/\bC<\s*D<[^>]+>\s*(=\s*)?/C<E<lt> $name E<gt>=/;
9 }
10 if(0) { 1 }
11 elsif(/^=for +literate:command +target=/) { 1 }
12 elsif(/^=for +literate +target:/) { 1 } # deprecated
13 elsif(/^=end\h+literate/) { undef($title) }
14 elsif(/^=for\h+literate\h+\.\h*$/) { undef($title) }
15 elsif(/^=begin\h+literate\h+\+?(\H.*?)\h*$/) { $title=$1 }
16 elsif(/^=for\h+literate\h+\+?(\H.*?)\h*$/) { $title=$1 }
17 elsif($title&&/^(\h*)\S/) { print "$1< $title >=\n$_"; undef($title) }
18 else { print }
19 }
20