6 my @precommands=('uname -a','perl -V');
7 my @manpages=('dlopen','shl_load','dlsym','dlclose');
8 my @postcommands=map { "man $_ | col -bf | cat -s" } @manpages;
12 This script will gather information about your system in order to
13 help debugging the problem compiling or testing Imager on your
16 Make sure that you are in the same directory as errep.perl is when
17 running the script. Also make sure that the environment variables
18 are the same as when running perl Makefile.PL
20 It issues: uname -a, perl -V and gets the %Config hash from the
21 build of the perl binary. Then it tries to build and test the
22 module (but not install it). It dumps out the test logs if there
23 are any. It ends by dumping out some manpages.
25 All the results are saved to the file 'report.txt'
33 die "Aborted!\n" if $a =~ /^n/i;
35 print "Generating info about system\n";
37 open OSTD, '>&STDOUT' or die $!;
38 open STDOUT, '>report.txt' or die $!;
39 open STDERR, '>&STDOUT' or die $!;
41 rcomm('rm testout/*');
43 my $make = $Config{make};
44 rcomm("$^X Makefile.PL") || rcomm("$make") || rcomm("$make test TEST_VERBOSE=1");
45 head("Logfiles from run");
52 head("perl Config parameters");
53 for(sort keys %Config) { print $_,"=>",(defined $Config{$_} ? $Config{$_} : '(undef)'),"\n"; }
61 for $comm(@commands) {
62 print "Executing '$comm'\n";
63 print OSTD "Executing '$comm'\n";
65 print "warning - rc=$R\n" if $R;
66 print "=====================\n\n";
73 print "=========================\n";
75 print "\n=========================\n";
79 opendir(DH,"testout") || die "Cannot open dir testout: $!\n";
80 my @fl=sort grep(/\.log$/,readdir(DH));
83 print "::::::::::::::\ntestout/$f\n::::::::::::::\n";
84 open(FH,"testout/$f") || warn "Cannot open testout/$f: $!\n";