[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at dev.open-bio.org
Fri Feb 9 21:38:28 UTC 2007


mwilkinson
Fri Feb  9 16:38:28 EST 2007
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory dev.open-bio.org:/tmp/cvs-serv6831/MOBY/Client

Modified Files:
	Central.pm 
Log Message:
fixing potential infinite loop that Eddie found
moby-live/Perl/MOBY/Client Central.pm,1.145,1.146
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm	2007/02/07 00:07:11	1.145
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm	2007/02/09 21:38:28	1.146
@@ -184,11 +184,11 @@
 	sub Connection {
 		my ( $self, $desired ) = @_;
 		if ($desired) {
-			while ( my ( $name, $type, $connect ) =
-				( @{ $self->Connections->[0] } ) )
-			{
-				return ( $type, $connect ) if $name eq $desired;
-			}
+		    my @registries = @{$self->Connections};
+		    foreach (@registries){
+			my ( $name, $type, $connect ) = @{$_};
+			return ( $type, $connect ) if $name eq $desired;
+		    }
 		}
 		else {
 			my ( $name, $type, $connect ) = @{ $self->Connections->[0] };




More information about the MOBY-guts mailing list