Pod-L10N
view release on metacpan or search on metacpan
t/anchorify.t view on Meta::CPAN
use strict;
use warnings;
use Pod::L10N::Html::Util qw( anchorify relativize_url );
use Test::More;
my @filedata;
{
local $/ = '';
@filedata = <DATA>;
}
my (@poddata, $i, $j);
for ($i = 0, $j = -1; $i <= $#filedata; $i++) {
$j++ if ($filedata[$i] =~ /^\s*=head[1-6]/);
if ($j >= 0) {
$poddata[$j] = "" unless defined $poddata[$j];
$poddata[$j] .= "\n$filedata[$i]" if $j >= 0;
}
( run in 0.450 second using v1.01-cache-2.11-cpan-697924b945d )