Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
revert to working old-locate-curli-module for time being
  • Loading branch information
stmuk committed Jul 8, 2016
1 parent d92efe7 commit ea4191a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/p6doc
Expand Up @@ -35,8 +35,8 @@ sub locate-module(Str $modulename) {
my $m = @candidates.first: *.IO.f;

unless $m.defined {
# not "core" pod now try for panda installed module XXX not zef
$m = locate-curli-module($modulename);
# not "core" pod now try for panda or zef installed module
$m = old-locate-curli-module($modulename);
}

unless $m.defined {
Expand Down Expand Up @@ -214,6 +214,14 @@ sub prompt-with-options(%options, %found) {
return $final-docee;
}

sub old-locate-curli-module($module) {
my $cu = $*REPO.need(CompUnit::DependencySpecification.new(:short-name($module)));
return ~ $cu.repo.prefix.child('sources/' ~ $cu.repo-id);
}

# I get an error "Odd number of elements..." with following code as of 160708
# using 'p6doc SVG::Plot' etc. Reverted to version of original code above -- stmuk

sub locate-curli-module($module) {
my $installed := list-installed();
my $dist = $installed.first({ $_.name eq $module or $_.hash<provides>{$module}:exists });
Expand Down

0 comments on commit ea4191a

Please sign in to comment.