Skip to content

Commit ed107f3

Browse files
committed
Set default values for title and author elements
1 parent 0562a79 commit ed107f3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

htmlify.pl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144

145145
sub pod-title-contents($pod, $file) {
146146
my $title-element = $pod[0].contents[0];
147-
my $title;
147+
my $title = "";
148148
if $title-element ~~ Pod::Block::Named && $title-element.name eq "TITLE" {
149149
try {
150150
$title = $title-element.contents[0].contents[0];
@@ -162,7 +162,7 @@
162162

163163
sub pod-author-contents($pod, $file) {
164164
my $author-element = $pod[0].contents[1];
165-
my $author;
165+
my $author = "";
166166
if $author-element ~~ Pod::Block::Named && $author-element.name eq "AUTHOR" {
167167
try {
168168
$author = $author-element.contents[0].contents[0];
@@ -174,6 +174,7 @@
174174
else {
175175
say "$file lacks an AUTHOR";
176176
}
177+
177178
return $author;
178179
}
179180

0 commit comments

Comments
 (0)