[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Wed Mar 16 19:14:15 UTC 2005


mwilkinson
Wed Mar 16 14:14:15 EST 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory pub.open-bio.org:/tmp/cvs-serv10100/MOBY/Client

Modified Files:
	Central.pm 
Log Message:
should correctly parse out the secondary parameter details without absurd restrictions.

moby-live/Perl/MOBY/Client Central.pm,1.91,1.92
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm	2005/03/16 17:32:06	1.91
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm	2005/03/16 19:14:15	1.92
@@ -913,18 +913,17 @@
 		$message .= "<secondaryArticles>\n";
 		while ( my ( $param, $desc ) = each %SEC ) {
 			unless ( ( ref( $desc ) ) =~ /hash/i ) {
-				return $self->errorRegXML(
-"invalid structure of secondary article $param; expected hashref of limitations"
+				return $self->errorRegXML("invalid structure of secondary article $param; expected hashref of limitations"
 				);
 			}
 			my %data     = %{$desc};
-			my $default  = $data{default};
-			my $max      = $data{max};
-			my $min      = $data{min};
-			my $datatype = $data{datatype};
+			my $default  = $data{default}||"";
+			my $max      = $data{max}||"";
+			my $min      = $data{min}||"";
+			my $datatype = $data{datatype}||"";
+            my $enums    = $data{enum}||[];
 			unless ( $datatype ) {
-				return $self->errorRegXML(
-"a secondaryArticle must contain at least a datatype value in secondary article $param"
+				return $self->errorRegXML("a secondaryArticle must contain at least a datatype value in secondary article $param"
 				);
 			}
 			unless (    ( $datatype =~ /Integer/ )
@@ -932,16 +931,14 @@
 					 || ( $datatype =~ /String/ )
 					 || ( $datatype =~ /DateTime/ ) )
 			{
-				return $self->errorRegXML(
-"a secondaryArticle must have a datatype of Integer, Float, String, or DateTime"
+				return $self->errorRegXML("a secondaryArticle must have a datatype of Integer, Float, String, or DateTime"
 				);
 			}
-			unless ( ( ref( $data{enum} ) ) =~ /array/i ) {
-				return $self->errorRegXML(
-"invalid structure of enum limits in secondary article $param; expected arrayref"
+			unless ( ( ref( $enums ) ) =~ /array/i ) {
+				return $self->errorRegXML("invalid structure of enum limits in secondary article $param; expected arrayref"
 				);
 			}
-			my @enums = @{ $data{enum} };
+			my @enums = @{ $enums };
 			$message .= "<Parameter articleName='$param'>\n";
 			$message .= "<default>$default</default>\n";
 			$message .= "<datatype>$datatype</datatype>\n";




More information about the MOBY-guts mailing list