[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Wed Apr 15 17:45:23 UTC 2009


kawas
Wed Apr 15 13:45:23 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv21776/MOBY-Server/lib/MOBY

Modified Files:
	CommonSubs.pm 
Log Message:
got fed up of seeing a warning from CommonSubs, so I fixed the underlying problem
moby-live/Perl/MOBY-Server/lib/MOBY CommonSubs.pm,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/CommonSubs.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/CommonSubs.pm	2008/09/22 15:42:27	1.6
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/CommonSubs.pm	2009/04/15 17:45:23	1.7
@@ -1171,7 +1171,17 @@
       . "\n called from line $line";
     return '';
   }
-  return ( $xref->getAttributeNode($attr) || $xref->getAttributeNode( $xref->lookupNamespacePrefix('http://www.biomoby.org/moby') . ":$attr" ) );
+  # check for just the attribute by name
+  return $xref->getAttributeNode($attr)
+    if $xref->getAttributeNode($attr);
+  # check for a namespaced attribute by name
+  return $xref->getAttributeNodeNS('http://www.biomoby.org/moby', $attr)
+  	if $xref->getAttributeNodeNS('http://www.biomoby.org/moby', $attr);
+  # check for a namespaced attribute with a prefix ... this is probably redundant!
+  return $xref->getAttributeNode( $xref->lookupNamespacePrefix('http://www.biomoby.org/moby') . ":$attr") 
+  	if $xref->lookupNamespacePrefix('http://www.biomoby.org/moby');
+  # cant find it ...
+  return '';
 }
 
 sub _moby_getAttribute {
@@ -1191,7 +1201,18 @@
     . "\n called from line $line";
     return '';
   }
-  return (   $xref->getAttribute($attr) || $xref->getAttribute( $xref->lookupNamespacePrefix('http://www.biomoby.org/moby') . ":$attr") );
+  
+  # check for just the attribute by name
+  return $xref->getAttribute($attr)
+    if $xref->getAttribute($attr);
+  # check for a namespaced attribute by name
+  return $xref->getAttributeNS('http://www.biomoby.org/moby', $attr)
+  	if $xref->getAttributeNS('http://www.biomoby.org/moby', $attr);
+  # check for a namespaced attribute with a prefix ... this is probably redundant!
+  return $xref->getAttribute( $xref->lookupNamespacePrefix('http://www.biomoby.org/moby') . ":$attr") 
+  	if $xref->lookupNamespacePrefix('http://www.biomoby.org/moby');
+  # cant find it ...
+  return '';
 }
 
 sub _makeXrefType {




More information about the MOBY-guts mailing list