Skip to content

Commit d8f36f3

Browse files
committed
fix p6doc CLI index generation
1 parent 2cc8c2f commit d8f36f3

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

bin/p6doc-index

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,15 @@ multi sub MAIN('path-to-index') {
2727
multi sub MAIN('build') {
2828
my %words;
2929

30-
# XXX p6doc probably uses another path to @*INC which is probably incomplete
31-
32-
for @*INC.map({CompUnitRepo.new($_)})».IO -> $lib_path is copy {
33-
next unless $lib_path.e;
34-
35-
$lib_path = $lib_path.Str;
30+
# XXX should index more than this
31+
for ($*REPO.repo-chain()>>.Str X~ </doc/>).grep: *.IO.d -> $lib_path is copy {
3632
my @files = find(:dir($lib_path),:type('file')).map({.IO});
3733

3834
for @files -> $f {
3935
my $file = $f.path;
4036
next if $file !~~ /\.pod$/;
4137
my $pod = substr($file.Str, 0 , $file.Str.chars -4);
42-
$pod.=subst(/$lib_path\//,"");
38+
$pod.=subst($lib_path,"");
4339
$pod.=subst(/\//,'::',:g);
4440
my $section = '';
4541
for open( $file.Str).lines -> $row {

0 commit comments

Comments
 (0)