File: requiredmods.t

package info (click to toggle)
pdl 1%3A2.4.7%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 10,128 kB
  • ctags: 5,821
  • sloc: perl: 26,328; fortran: 13,113; ansic: 9,378; makefile: 71; sh: 50; sed: 6
file content (38 lines) | stat: -rw-r--r-- 935 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use Test;

plan tests => 2;

my @hasnt = ();
my @test = (['Filter::Util::Call','Filter'],
	    ['Text::Balanced','Text::Balanced'],
	   );	
for my $mod (@test) {
  eval "use $mod->[0]";
  ok !$@;
  push @hasnt, $mod->[1] if $@;
}

if (@hasnt) {
        print STDERR << 'EOP';

********************************************************
* IMPORTANT: Your installation will not work since it  *
* lacks critical modules.                              *
* ALL TESTS WILL FAIL UNLESS YOU IMMEDIATELY           *
* INSTALL THE FOLLOWING MODULES [available from CPAN]: *
*
EOP

    for (@hasnt) { print STDERR "*\t$_\n" }


    print STDERR << 'EOP';
*                                                      *
* Please install the missing module(s) and start the   *
* PDL build process again (perl Makefile.PL; ....)     *
*                                                      *
********************************************************

EOP

}