Skip to content

Commit 7339333

Browse files
committed
Insert code if no pod is found in file
1 parent af480e6 commit 7339333

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

htmlify.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
next unless $file.IO.e;
7676
my $perl-pod = qqx{perl6-m -Ilib --doc=Perl $file};
7777
my $pod = EVAL $perl-pod;
78+
if !$pod {
79+
my @contents = $file.lines.join("\n");
80+
$pod = pod-with-title($file.basename,
81+
pod-code(@contents),
82+
);
83+
}
7884
my $html-file = $file.subst(/\.p(l|6)/, ".html");
7985
spurt "html/$html-file", p2h($pod);
8086
}

0 commit comments

Comments
 (0)