Debian Codegraph @

t/Require.t

raw
1 #!perl -w
2 use strict;
3 BEGIN { $ENV{'PERL_DL_NONLAZY'} = 1 }
4
5 require Tk;
6 # $SIG{__WARN__} = sub { die shift };
7 my ($dir) = $INC{'Tk.pm'} =~ /^(.*)\.pm$/;
8 opendir(TK,$dir) || die "Cannot opendir $dir:$!";
9 my @files = grep(/\.pm$/,readdir(TK));
10 closedir(TK);
11 my $file;
12 $Test::ntest = @files;
13 print "1..",$Test::ntest,"\n";
14 my $count = 1;
15 foreach $file (@files)
16 {
17 if ($file =~ /\.pm$/)
18 {
19 # print "Tk/$file\n";
20 eval { require "Tk/$file" };
21 if ($@)
22 {
23 warn "Tk/$file: $@";
24 print "not ";
25 }
26 print "ok ",$count++,"\n";
27 }
28 }
29