File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,18 @@ multi sub MAIN($docee) {
82
82
multi sub MAIN ($ docee , Bool : $ f ! ) {
83
83
my ($ package , $ method ) = $ docee . split (' .' );
84
84
unless $ method {
85
- say ' unqualified sub and method names are not yet implemented' ;
86
- say ' For example use "p6doc -f Str.split" instead of "p6doc -f split" for now' ;
85
+ if ' index.data' . IO ~~ : e {
86
+ my % data = EVAL slurp ' index.data' ;
87
+ my $ ndocee = " method " ~ $ docee ;
88
+ if % data {$ ndocee } {
89
+ my $ newdoc = % data {$ ndocee }[0 ][0 ] ~ " ." ~ $ docee ;
90
+ return MAIN($ newdoc , : f);
91
+ }
92
+ show-docs(locate-module($ docee ));
93
+ }
94
+ say ' Unqualified sub and method names like "p6doc -f say" are experimental' ;
95
+ say ' in order to use them you will need to run index.p6 to build index.data' ;
96
+ say ' otherwise use "p6doc -f Str.split" instead of "p6doc -f split" for now' ;
87
97
exit 2 ;
88
98
}
89
99
my $ m = locate-module($ package );
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ multi sub MAIN('index') {
24
24
# if $row ~~ /^\=(item|head\d) \s+ X\<(.*)\> \s*$/ {
25
25
if $ row ~~ /^ \=(item| head\d ) \s + (.*? ) \s * $ / {
26
26
$ section = $1 . Str ;
27
- $ section .= subst (/\| /," " ,: g);
28
27
% words {$ section }. push ([$ pod , $ section ]);
29
28
}
30
29
if $ row ~~ /X\<( .*? )\> / and $ section {
You can’t perform that action at this time.
0 commit comments