Debian Codegraph @

pod/subs

raw
1 #!/usr/local/bin/perl -w
2 use blib;
3 use Tk;
4 use strict;
5 no strict 'refs';
6 BEGIN { $ENV{'PERL_DL_NONLAZY'} = 1 }
7 require Tk;
8 # $SIG{__WARN__} = sub { die shift };
9 my ($dir) = $INC{'Tk.pm'} =~ /^(.*)\.pm$/;
10 opendir(TK,$dir) || die "Cannot opendir $dir:$!";
11 my @files = grep(/\.pm$/,readdir(TK));
12 closedir(TK);
13 my $file;
14 my $count = 1;
15 foreach $file (@files)
16 {
17 if ($file =~ /\.pm$/)
18 {
19 eval { require "Tk/$file" };
20 if ($@)
21 {
22 warn "Tk/$file: $@";
23 }
24 }
25 }
26
27 use File::Find;
28 my @al = ();
29 find(sub { push(@al,$File::Find::name) if (/\.al$/); }, "$dir/../auto/Tk" );
30
31 while (@al)
32 {
33 my $file = shift(@al);
34 require $file;
35 }
36
37 sub dump_subs
38 {
39 my $pack = shift;
40 warn "Dumping $pack\n";
41 foreach (sort keys %{$pack."::"})
42 {
43 local *foo = *{$pack."::$_"};
44 if (defined &foo)
45 {
46 print $pack."::$_\n";
47 }
48 elsif (/^(.*)::$/)
49 {
50 dump_subs($pack.'::'.$1);
51 }
52 }
53 }
54
55 dump_subs('Tk');