|
From: Chris W. <la...@us...> - 2001-10-15 00:08:32
|
Update of /cvsroot/openinteract/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv19159
Modified Files:
Makefile.PL
Log Message:
updated to recognize ODBC as a valid driver and if it's chosen, to ask
the user what SPOPS driver to use (e.g., use 'Sybase' with Microsoft
SQL)
Index: Makefile.PL
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/Makefile.PL,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Makefile.PL 2001/08/22 11:10:04 1.10
--- Makefile.PL 2001/10/15 00:08:27 1.11
***************
*** 15,18 ****
--- 15,19 ----
Pg => 1,
ASAny => 1,
+ ODBC => 1,
Sybase => \&_set_sybase_env );
***************
*** 130,134 ****
eval { require DBI };
if ( $@ ) {
! print "You don't appear to have DBI installed; skipping DBI tests.";
return ( 'n' );
}
--- 131,135 ----
eval { require DBI };
if ( $@ ) {
! print "You don't appear to have DBI installed; skipping DBI tests.\n";
return ( 'n' );
}
***************
*** 159,162 ****
--- 160,172 ----
print "\n";
+ my ( $odbc_driver );
+ if ( $dbi_driver eq 'ODBC' ) {
+ print "You've chosen ODBC as your DBD. However, SPOPS needs to know ",
+ "what type of database is working behind the ODBC driver.\n";
+ $odbc_driver = get_response( "Choose a database behind the scenes (MySQL, Pg, Sybase)\n" .
+ "(MS SQL users should enter 'Sybase')", 'Sybase' );
+ }
+ print "\n";
+
$dbi_dsn = get_response( "Please enter the tail end of the DSN to use for the driver you chose\n" .
"('DBI:$dbi_driver:' will be prepended unless you specify a full DSN)\n",
***************
*** 176,179 ****
--- 186,191 ----
"'$CONFIG_FILE' after the tests have run since it \n",
"contains user/password information.\n\n";
+
+ $dbi_driver = $odbc_driver if ( $odbc_driver );
return ( 'y', $dbi_driver, $dbi_dsn, $dbi_user, $dbi_pass );
}
***************
*** 186,190 ****
eval { require Net::LDAP };
if ( $@ ) {
! print "You don't appear to have Net::LDAP installed; skipping LDAP tests.";
return ( 'n' );
}
--- 198,202 ----
eval { require Net::LDAP };
if ( $@ ) {
! print "You don't appear to have Net::LDAP installed; skipping LDAP tests.\n";
return ( 'n' );
}
***************
*** 214,218 ****
eval { require GDBM_File };
if ( $@ ) {
! print "You don't appear to have GDBM_File installed, skipping GDBM tests.";
return ( 'n' );
}
--- 226,230 ----
eval { require GDBM_File };
if ( $@ ) {
! print "You don't appear to have GDBM_File installed, skipping GDBM tests.\n";
return ( 'n' );
}
|