Skip to content

Commit f650e84

Browse files
committed
Stop adding source code when no pod in source
... and this time do it in the right place!
1 parent 3dfe034 commit f650e84

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/Pod/Htmlify.pm6

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,8 @@ class Website is export {
6262
method collect-example-metadata($file, $category-key) {
6363
say "Collecting metadata from $file";
6464
my $perl-pod = qqx{perl6-m -Ilib --doc=Perl $file};
65-
my $pod = EVAL $perl-pod;
6665
my $file-basename = $file.basename;
67-
if !$pod {
68-
my @contents = $file.lines.join("\n");
69-
$pod = Array.new(pod-with-title($file-basename,
70-
pod-code(@contents),
71-
));
72-
}
66+
my $pod = (EVAL $perl-pod) || [pod-with-title($file-basename)];
7367
my $example-title = pod-title-contents($pod, $file-basename);
7468
my $author = pod-author-contents($pod, $file-basename);
7569
my $html-file = $file-basename.subst(/\.p[l||6]$/, ".html");

0 commit comments

Comments
 (0)