[Bio] / Sprout / Sapling.pm Repository:
ViewVC logotype

Diff of /Sprout/Sapling.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24, Mon Nov 30 11:44:21 2009 UTC revision 1.25, Mon Nov 30 17:39:10 2009 UTC
# Line 178  Line 178 
178    
179  Database host name.  Database host name.
180    
181    =item port
182    
183    MYSQL port number to use.
184    
185  =back  =back
186    
187  =cut  =cut
# Line 190  Line 194 
194                          "$FIG_Config::fig/SaplingData";                          "$FIG_Config::fig/SaplingData";
195      my $dbd = $options{DBD} || "$loadDirectory/SaplingDBD.xml";      my $dbd = $options{DBD} || "$loadDirectory/SaplingDBD.xml";
196      my $dbName = $options{dbName} || $FIG_Config::saplingDB || "nmpdr_sapling";      my $dbName = $options{dbName} || $FIG_Config::saplingDB || "nmpdr_sapling";
     my $sock = $options{sock} || $FIG_Config::sproutSock || "";  
197      my $userData = $options{userData} || "seed/";      my $userData = $options{userData} || "seed/";
198      my $dbhost = $options{dbhost} || $FIG_Config::saplingHost || "localhost";      my $dbhost = $options{dbhost} || $FIG_Config::saplingHost || "localhost";
199        my $port = $options{port} || 3306;
200        # Compute the socket. An empty string is a valid override here.
201        my $sock = $options{sock};
202        if (! defined $sock) {
203            $sock = $FIG_Config::sproutSock || "";
204        }
205      # Compute the user name and password.      # Compute the user name and password.
206      my ($user, $pass) = split '/', $userData, 2;      my ($user, $pass) = split '/', $userData, 2;
207      $pass = "" if ! defined $pass;      $pass = "" if ! defined $pass;
208      Trace("Connecting to sapling database.") if T(2);      Trace("Connecting to sapling database.") if T(2);
209      # Connect to the database.      # Connect to the database.
210      my $dbh = DBKernel->new('mysql', $dbName, $user, $pass, 3306, $dbhost, $sock);      my $dbh = DBKernel->new('mysql', $dbName, $user, $pass, $port, $dbhost, $sock);
211      # Create the ERDB object.      # Create the ERDB object.
212      my $retVal = ERDB::new($class, $dbh, $dbd, %options);      my $retVal = ERDB::new($class, $dbh, $dbd, %options);
213      # Add the load directory pointer.      # Add the load directory pointer.

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3