NAME

Release Manager's Guide with Checklist

Checklist

EOF

my $last_level = 0;
for my $head ( @{$heads} ) {
    my $level = $head->[0] - 1;

    if ( $level > $last_level ) {
        $new_pod .= '=over ' . $level * 4;
        $new_pod .= "\n\n";
    }
    elsif ( $level < $last_level ) {
        $new_pod .= "=back\n\n" for 1 .. ( $last_level - $level );
    }

    $new_pod .= '=item * ' . 'L<< /' . $head->[1] . " >>\n\n";

    $last_level = $level;
}

$new_pod .= "=back\n\n" while $last_level--;

$new_pod .= $pod;

return $new_pod;
}

main();