Skip to content

Commit

Permalink
Look under Language and Type so that 'p6doc Str' and 'p6doc faq' now
Browse files Browse the repository at this point in the history
work.
  • Loading branch information
stmuk committed Jan 14, 2016
1 parent 16af427 commit a41aee8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/p6doc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sub module-names(Str $modulename) {
}

sub locate-module(Str $modulename) {
my @candidates = (search-paths() X~ module-names($modulename).list);
my @candidates = (search-paths() X~ </ Type/ Language/> X~ module-names($modulename).list);
DEBUG and warn :@candidates.perl;
my $m = @candidates.first: *.IO.f;
unless $m.defined {
Expand Down Expand Up @@ -77,14 +77,15 @@ multi sub MAIN() {
my $me = $PROGRAM-NAME;

say 'What documentation do you want to read?';
say "Examples: $me Type::Str";
say " $me Type::Str.split";
say "Examples: $me Str";
say " $me Str.split";
say " $me faq";

say "\nYou can also look up specific method/routine definitions:";
say " $me -f push";

say "\nYou can bypass the pager and print straight to stdout:";
say " $me -n Type::Str"
say " $me -n Str"
}

multi sub MAIN($docee, Bool :$n) {
Expand Down

0 comments on commit a41aee8

Please sign in to comment.