[Bioperl-guts-l] [14828] bioperl-live/trunk/Bio/DB/GFF/Typename.pm: quashed an uninit variable warning
Lincoln Stein
lstein at dev.open-bio.org
Tue Aug 26 14:39:27 EDT 2008
Revision: 14828
Author: lstein
Date: 2008-08-26 14:39:25 -0400 (Tue, 26 Aug 2008)
Log Message:
-----------
quashed an uninit variable warning
Modified Paths:
--------------
bioperl-live/trunk/Bio/DB/GFF/Typename.pm
Modified: bioperl-live/trunk/Bio/DB/GFF/Typename.pm
===================================================================
--- bioperl-live/trunk/Bio/DB/GFF/Typename.pm 2008-08-25 23:35:42 UTC (rev 14827)
+++ bioperl-live/trunk/Bio/DB/GFF/Typename.pm 2008-08-26 18:39:25 UTC (rev 14828)
@@ -150,12 +150,15 @@
my $self = shift;
my $target = shift;
my ($method,$source);
+
if (UNIVERSAL::isa($target,'Bio::DB::GFF::Typename')) {
($method,$source) = ($target->method,$target->source);
} else {
($method,$source) = split /:/,$target;
}
+ $source ||= ''; # quash uninit variable warnings
+
return if $method ne '' && $self->method ne '' && $method ne $self->method;
return if $source ne '' && $self->source ne '' && $source ne $self->source;
1;
More information about the Bioperl-guts-l
mailing list