[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Fri Jul 22 22:57:28 UTC 2005
mwilkinson
Fri Jul 22 18:57:28 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory pub.open-bio.org:/tmp/cvs-serv2184/MOBY/Client
Modified Files:
Central.pm
Log Message:
secondaries that had 0 as their min, max, or default vaules were not registering properly because of a test for value rather than defined
moby-live/Perl/MOBY/Client Central.pm,1.99,1.100
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/07/19 22:54:10 1.99
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/07/22 22:57:28 1.100
@@ -929,19 +929,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 $enums = $data{enum} || [];
+ my $default = defined($data{default}) || "";
+ my $max = defined($data{max}) || "";
+ my $min = defined($data{min}) || "";
+ my $datatype = defined($data{datatype}) || "";
+ my $enums = defined($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/ )
@@ -949,13 +947,11 @@
|| ( $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($enums) ) =~ /array/i ) {
- return $self->errorRegXML(
-"invalid structure of enum limits in secondary article $param; expected arrayref"
+ return $self->errorRegXML("invalid structure of enum limits in secondary article $param; expected arrayref"
);
}
my @enums = @{$enums};
More information about the MOBY-guts
mailing list