[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jul 22 19:38:02 UTC 2005


mwilkinson
Fri Jul 22 15:38:02 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv1077/MOBY

Modified Files:
	Central.pm service_instance.pm 
Log Message:
the logic for findig existing services was still wonky.

moby-live/Perl/MOBY Central.pm,1.167,1.168 service_instance.pm,1.23,1.24
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/07/22 19:16:40	1.167
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/07/22 19:38:02	1.168
@@ -1292,11 +1292,8 @@
 		description   => $desc,
 		signatureURL  => $signatureURL,
 	);
-	return &_error( "Service registration failed for unknown reasons", "" )
-	  if ( !defined $SVC );
-	return &_error( "Service with this authority/servicename already exists",
-		"" )
-	  if ( $SVC == -1 );
+	return &_error( "Service registration failed for unknown reasons", "" ) if ( !defined $SVC );
+
 	$debug && &_LOG("new service instance created\n");
 
 	foreach my $IN (@IN) {
@@ -1716,27 +1713,26 @@
 	my ( $authURI, $serviceName ) = &_deregisterServicePayload($payload);
 	return &_error( "must provide an authority and a service name\n", "" )
 	  unless ( $authURI && $serviceName );
-	return &_error(
-"The service specified by authority=$authURI servicename=$serviceName does not exist in the registry",
-		""
-	  )
+	return &_error("The service specified by authority=$authURI servicename=$serviceName does not exist in the registry","")
 	  unless (
 		MOBY::service_instance->new(
 			servicename   => $serviceName,
 			authority_uri => $authURI,
 			test          => 1
-		)
-	  );
+		));
 	my $SERVICE = MOBY::service_instance->new(
 		servicename   => $serviceName,
 		authority_uri => $authURI
 	);
+	return &_error("service lookup failed for unknown reasons","") unless ($SERVICE);
+
 	if ( $SERVICE->signatureURL ) {
 		return &_error(
 "it is illegal to deregister a service that has a signatureURL.  Such services must be deregistered by deleting the RDF at the location identified by the signatureURL",
 			""
 		);
 	}
+
 	my $result = $SERVICE->DELETE_THYSELF;
 	if ($result) {
 		return &_success( "Service Deregistered Successfully", "" );

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm	2005/07/22 19:16:40	1.23
+++ /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm	2005/07/22 19:38:02	1.24
@@ -190,7 +190,6 @@
 	return undef unless $self->servicename;
 
 	if ( $self->test ) { return $self->service_instance_exists }
-	if ($self->service_instance_exists){return -1}
 
 	$self->authority( $self->_get_authority() );
 




More information about the MOBY-guts mailing list