Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Finished variable rename

  • Loading branch information...
commit 33c160bee45dea6fe3b9ae74a0a6d7cad295925b 1 parent 6f4888b
@fangly fangly authored
Showing with 10 additions and 11 deletions.
  1. +10 −11 Bio/SeqIO.pm
View
21 Bio/SeqIO.pm
@@ -375,18 +375,18 @@ sub new {
$self->_initialize(@args);
return $self;
} else {
- my %param = @args;
- @param{ map { lc $_ } keys %param } = values %param; # lowercase keys
+ my %params = @args;
+ @params{ map { lc $_ } keys %params } = values %params; # lowercase keys
- unless( defined $param{-file} ||
- defined $param{-fh} ||
- defined $param{-string} ) {
+ unless( defined $params{-file} ||
+ defined $params{-fh} ||
+ defined $params{-string} ) {
$class->throw("file argument provided, but with an undefined value")
- if exists $param{'-file'};
+ if exists $params{'-file'};
$class->throw("fh argument provided, but with an undefined value")
- if exists $param{'-fh'};
+ if exists $params{'-fh'};
$class->throw("string argument provided, but with an undefined value")
- if exists($param{'-string'});
+ if exists($params{'-string'});
# $class->throw("No file, fh, or string argument provided"); # neither defined
}
@@ -414,12 +414,11 @@ sub new {
if ($format =~ /-/) {
($format, my $variant) = split('-', $format, 2);
- push @args, (-variant => $variant);
+ $params{-variant} = $variant;
}
-
return unless( $class->_load_format_module($format) );
- return "Bio::SeqIO::$format"->new(@args);
+ return "Bio::SeqIO::$format"->new(%params);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.