[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Jun 10 01:30:12 UTC 2003


mwilkinson
Mon Jun  9 21:30:11 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv27376/MOBY

Modified Files:
	OntologyServer.pm 
Log Message:
the client side wrapper for the new MOBY Cental function

moby-live/Perl/MOBY OntologyServer.pm,1.11,1.12
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/06/09 23:47:59	1.11
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/06/10 01:30:11	1.12
@@ -136,10 +136,14 @@
     $self->ontology eq 'relationship' && $self->database('mobyrelationship');
     
     my ($dsn) = "DBI:mysql:".($self->database).":".($self->host).":".($self->port);
-    	
 
+    my $dbh;
 #	$debug && &_LOG("connecting to db with params ",$self->database, $self->username, $self->password,"\n");
-	my $dbh = DBI->connect($dsn, $self->username, $self->password, {RaiseError => 1}) or die "can't connect to database";
+	if ($self->password){
+    	$dbh = DBI->connect($dsn, $self->username, $self->password, {RaiseError => 1}) or die "can't connect to database";
+	} else {
+    	$dbh = DBI->connect($dsn, $self->username,undef, {RaiseError => 1}) or die "can't connect to database";
+	}
 #	$debug && &_LOG("CONNECTED!\n");
     if ($dbh){
         $self->dbh($dbh);
@@ -213,16 +217,6 @@
 
 =cut
 
-#                objectType => "the name of the Object"
-#                description => "a human-readable description of the object"
-#                contactEmail => "your at email.address"
-#                authURI => "URI of the registrar of this object"
-#                Relationships => {
-#                    relationshipType1 => [
-#                        [Object1, articleName],
-#                        [Object2, articleName]],
-#                    relationshipType2 => [
-#                        [Object1, articleName]]}
 
 sub retrieveObject {
     my ($self, %args) = @_;




More information about the MOBY-guts mailing list