[Bioperl-guts-l] bioperl-live/Bio/PopGen IO.pm, 1.3, 1.4 PopStats.pm, 1.7, 1.8 Statistics.pm, 1.31, 1.32 Utilities.pm, 1.4, 1.5

Heikki Lehvaslaiho heikki at dev.open-bio.org
Wed Jun 7 05:54:54 EDT 2006


Update of /home/repository/bioperl/bioperl-live/Bio/PopGen
In directory dev.open-bio.org:/tmp/cvs-serv1174/Bio/PopGen

Modified Files:
	IO.pm PopStats.pm Statistics.pm Utilities.pm 
Log Message:
cleaning unnecessary "return undef"s

Index: IO.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/PopGen/IO.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** IO.pm	28 Jul 2003 19:51:46 -0000	1.3
--- IO.pm	7 Jun 2006 09:54:52 -0000	1.4
***************
*** 118,122 ****
      $format = "\L$format";
      
!     return undef unless( $class->_load_format_module($format) );
      return "Bio::PopGen::IO::${format}"->new(@args);
    }
--- 118,122 ----
      $format = "\L$format";
      
!     return unless( $class->_load_format_module($format) );
      return "Bio::PopGen::IO::${format}"->new(@args);
    }

Index: PopStats.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/PopGen/PopStats.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** PopStats.pm	23 Feb 2005 04:51:59 -0000	1.7
--- PopStats.pm	7 Jun 2006 09:54:52 -0000	1.8
***************
*** 138,146 ****
         ref($populations) !~ /ARRAY/i ) { 
         $self->warn("Must provide a valid arrayref for populations");
!        return undef;
     } elsif( ! defined $markernames ||
  	    ref($markernames) !~ /ARRAY/i ) {
         $self->warn("Must provide a valid arrayref for marker names");
!        return undef;
     }
     my $num_sub_pops          = scalar @$populations;
--- 138,146 ----
         ref($populations) !~ /ARRAY/i ) { 
         $self->warn("Must provide a valid arrayref for populations");
!        return;
     } elsif( ! defined $markernames ||
  	    ref($markernames) !~ /ARRAY/i ) {
         $self->warn("Must provide a valid arrayref for marker names");
!        return;
     }
     my $num_sub_pops          = scalar @$populations;
***************
*** 148,152 ****
     if( $num_sub_pops < 2 ) {
         $self->warn("Must provide at least 2 populations for this test, you provided $num_sub_pops");
!        return undef;
     }
  
--- 148,152 ----
     if( $num_sub_pops < 2 ) {
         $self->warn("Must provide at least 2 populations for this test, you provided $num_sub_pops");
!        return;
     }
  
***************
*** 189,193 ****
  		   $self->warn("Could not derive Marker for $marker ".
  			       "from population ". $pop->name);
! 		   return undef;
  	       }
  
--- 189,193 ----
  		   $self->warn("Could not derive Marker for $marker ".
  			       "from population ". $pop->name);
! 		   return;
  	       }
  

Index: Utilities.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/PopGen/Utilities.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Utilities.pm	17 Apr 2004 09:31:08 -0000	1.4
--- Utilities.pm	7 Jun 2006 09:54:52 -0000	1.5
***************
*** 147,155 ****
     if( ! defined $aln ) { 
         $self->warn("Must provide a valid Bio::SimpleAlign object to run aln_to_population");
!        return undef;
     }
     if( ! $aln->is_flush ) {
         $self->warn("Must provide a Bio::SimpleAlign object with aligned sequences to aln_to_population!");
!        return undef;
     }
  
--- 147,155 ----
     if( ! defined $aln ) { 
         $self->warn("Must provide a valid Bio::SimpleAlign object to run aln_to_population");
!        return;
     }
     if( ! $aln->is_flush ) {
         $self->warn("Must provide a Bio::SimpleAlign object with aligned sequences to aln_to_population!");
!        return;
     }
  

Index: Statistics.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/PopGen/Statistics.pm,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** Statistics.pm	11 Feb 2006 15:46:32 -0000	1.31
--- Statistics.pm	7 Jun 2006 09:54:52 -0000	1.32
***************
*** 510,514 ****
      if( $n <= 1 ) {
  	$self->warn("N must be > 1\n");
! 	return undef;
      }
      if( $n == 2) { 
--- 510,514 ----
      if( $n <= 1 ) {
  	$self->warn("N must be > 1\n");
! 	return;
      }
      if( $n == 2) { 



More information about the Bioperl-guts-l mailing list