File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # !/usr/bin/env perl6
2
+ #
3
+ use v6 ;
4
+ use lib ' lib' ;
5
+ use Perl6::TypeGraph;
6
+
7
+ = begin pod
8
+
9
+ = head1 NAME
10
+
11
+ missing-methods
12
+
13
+ = head1 SYNOPSIS
14
+
15
+ $ perl6 util/missing-methods.p6
16
+
17
+ = head1 DESCRIPTION
18
+
19
+ A first cut at a program to find methods in a Perl 6 implementation which
20
+ have not yet been documented.
21
+
22
+ At present this involves a call to C < p6doc > in order to find if the methods
23
+ found have documentation. This could be improved by simply calling the
24
+ relevant routines within C < p6doc > instead of accessing the functionality
25
+ from outside.
26
+
27
+ = end pod
28
+
29
+ my $ t = Perl6::TypeGraph. new-from-file(' type-graph.txt' );
30
+
31
+ for $ t . sorted -> $ type {
32
+ my $ type_name = ::($ type . name );
33
+ my @ methods = $ type_name .^ methods(: local);
34
+ for @ methods -> $ method {
35
+ my $ qualified_method_name = $ type . name ~ ' .' ~ $ method . name ;
36
+ my $ doc_output = qqx { PAGER=cat ./bin/p6doc -f $ qualified_method_name} ;
37
+ say " $ qualified_method_name" if $ doc_output ~~ m :s /No documentation found /;
38
+ }
39
+ }
40
+
41
+ # vim: expandtab shiftwidth=4 ft=perl6
You can’t perform that action at this time.
0 commit comments