[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Mon Dec 22 19:57:04 UTC 2003
mwilkinson
Mon Dec 22 14:57:04 EST 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv14181/Perl/MOBY
Modified Files:
CommonSubs.pm
Log Message:
be kind, allow them to send a listref to validateThisNamespace if they do so by accident.
moby-live/Perl/MOBY CommonSubs.pm,1.35,1.36
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2003/12/12 19:22:44 1.35
+++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2003/12/22 19:57:04 1.36
@@ -937,6 +937,8 @@
sub validateThisNamespace {
my ($ns, @namespaces) = @_;
+ return 1 unless scalar @namespaces; # if you don't give me a list, I assume everything is valid...
+ if (ref($namespaces[1]) =~ /ARRAY/){@namespaces = @{$namespaces[1]}} # if you send me an arrayref I should be kind... DWIM!
foreach (@namespaces){
next unless $_;
return 1 if $ns eq $_;
More information about the MOBY-guts
mailing list