Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Pod::To::Text] Avoid uninitialized variable warnings

  • Loading branch information...
commit 18d51bacee7c4bc54ca22372c1d66e6e29c832db 1 parent 1683397
@tadzik tadzik authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Pod/To/Text.pm
View
5 lib/Pod/To/Text.pm
@@ -61,7 +61,10 @@ sub table2text($pod) {
for 0..(@rows[1].elems - 1) -> $i {
@maxes.push([max] @rows.map({ $_[$i].chars }));
}
- my $ret = $pod.config<caption> ~ "\n" // '';
+ my $ret;
+ if $pod.config<caption> {
+ $ret = $pod.config<caption> ~ "\n"
+ }
for @rows -> $row {
for 0..($row.elems - 1) -> $i {
$ret ~= $row[$i].fmt("%-{@maxes[$i]}s") ~ " ";
Please sign in to comment.
Something went wrong with that request. Please try again.