File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use Perl6::TypeGraph;
12
12
13
13
= head1 SYNOPSIS
14
14
15
- $ perl6 util/missing-methods.p6
15
+ $ perl6 util/missing-methods.p6 [--type_name=<Str>]
16
16
17
17
= head1 DESCRIPTION
18
18
@@ -26,11 +26,15 @@ from outside.
26
26
27
27
= end pod
28
28
29
- my $ type_graph = Perl6::TypeGraph. new-from-file(' type-graph.txt' );
29
+ sub MAIN (Str : $ type_name ) {
30
+ my $ type_graph = Perl6::TypeGraph. new-from-file(' type-graph.txt' );
31
+ my @ types_to_search = $ type_name ?? $ type_graph . types{$ type_name }
32
+ !! $ type_graph . sorted;
30
33
31
- for $ type_graph . sorted -> $ type {
32
- for methods-in-type($ type ) -> $ method {
33
- show-undoc-method($ type . name ~ ' .' ~ $ method . name );
34
+ for @ types_to_search -> $ type {
35
+ for methods-in-type($ type ) -> $ method {
36
+ show-undoc-method($ type . name ~ ' .' ~ $ method . name );
37
+ }
34
38
}
35
39
}
36
40
You can’t perform that action at this time.
0 commit comments