[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Jun 15 00:22:05 UTC 2004


mwilkinson
Mon Jun 14 20:22:05 EDT 2004
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv11838

Modified Files:
	OntologyServer.pm 
Log Message:
OntologyServer now reads the config file as well

moby-live/Perl/MOBY OntologyServer.pm,1.41,1.42
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2004/05/11 15:48:45	1.41
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2004/06/15 00:22:05	1.42
@@ -74,6 +74,7 @@
 use vars qw($AUTOLOAD);
 use DBI;
 use DBD::mysql;
+use MOBY::Config;
 
 my $debug = 0;
 
@@ -139,6 +140,14 @@
     $self->ontology eq 'service' && $self->database('mobyservice');
     $self->ontology eq 'relationship' && $self->database('mobyrelationship');
 
+	
+	my $conf = MOBY::Config->new;
+	$self->username = $conf->{$self->database}->{username} unless $self->username;
+    $self->password = $conf->{$self->database}->{password} unless $self->password;
+    $self->port = $conf->{$self->database}->{port} unless $self->port;
+    $self->dbname = $self->database unless $self->dbname;
+    $self->host = $conf->{$self->database}->{url} unless $self->host;
+ 
 	my $host = $self->host?$self->host:$ENV{MOBY_CENTRAL_URL}; chomp $host;
 	my $username = $self->username?$self->username:$ENV{MOBY_CENTRAL_DBUSER}; chomp $username;
 	my $password = $self->password?$self->password:$ENV{MOBY_CENTRAL_DBPASS}; chomp $password if $password; $password =~ s/\s//g if $password;




More information about the MOBY-guts mailing list