Make Curses perl module optional

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1022 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-04-11 17:35:26 +00:00
parent 62ed8c27cb
commit b06e17c233

View File

@ -53,6 +53,15 @@ my $pbsnodes = "/usr/local/pbs/bin/pbsnodes";
# we _are_ running it out of the source tree, assume we are just
# testing it and enable warnings!
BEGIN {
my $hascurses = eval {
require Curses;
};
unless ($hascurses) {
print "perl Curses required for pbstop\n";
exit 1;
}
import Curses;
use vars qw/$use_perlPBS/;
use ExtUtils::testlib;
@ -71,7 +80,6 @@ if ( -d $INC[0] ) {
use strict;
use vars qw/$VERSION/;
use Curses;
$VERSION = "4.05";