xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/t/lib/commonsense.t (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#!./perl
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gatechdir 't' if -d 't';
4*0Sstevel@tonic-gate@INC = '../lib';
5*0Sstevel@tonic-gaterequire Config; import Config;
6*0Sstevel@tonic-gateif (($Config{'extensions'} !~ /\b(DB|[A-Z]DBM)_File\b/) ){
7*0Sstevel@tonic-gate  print "Bail out! Perl configured without DB_File or [A-Z]DBM_File\n";
8*0Sstevel@tonic-gate  exit 0;
9*0Sstevel@tonic-gate}
10*0Sstevel@tonic-gateif (($Config{'extensions'} !~ /\bFcntl\b/) ){
11*0Sstevel@tonic-gate  print "Bail out! Perl configured without Fcntl module\n";
12*0Sstevel@tonic-gate  exit 0;
13*0Sstevel@tonic-gate}
14*0Sstevel@tonic-gateif (($Config{'extensions'} !~ /\bIO\b/) ){
15*0Sstevel@tonic-gate  print "Bail out! Perl configured without IO module\n";
16*0Sstevel@tonic-gate  exit 0;
17*0Sstevel@tonic-gate}
18*0Sstevel@tonic-gate# hey, DOS users do not need this kind of common sense ;-)
19*0Sstevel@tonic-gateif ($^O ne 'dos' && ($Config{'extensions'} !~ /\bFile\/Glob\b/) ){
20*0Sstevel@tonic-gate  print "Bail out! Perl configured without File::Glob module\n";
21*0Sstevel@tonic-gate  exit 0;
22*0Sstevel@tonic-gate}
23*0Sstevel@tonic-gate
24*0Sstevel@tonic-gateprint "1..1\nok 1\n";
25*0Sstevel@tonic-gate
26