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