Skip to content

Commit

Permalink
Deprecate the method 'get_default_source'
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Gil committed Feb 10, 2015
1 parent 684fa7d commit daa532b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions modules/Bio/EnsEMBL/Variation/DBSQL/VariationAdaptor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ use warnings;
package Bio::EnsEMBL::Variation::DBSQL::VariationAdaptor;

use Bio::EnsEMBL::Variation::DBSQL::BaseAdaptor;
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use Bio::EnsEMBL::Utils::Exception qw(throw deprecate warning);
use Bio::EnsEMBL::Utils::Scalar qw(assert_ref check_ref wrap_array);

use Bio::EnsEMBL::Variation::Variation;
Expand Down Expand Up @@ -916,25 +916,19 @@ sub get_all_sources{
Args : none
Example : $default_source = $va->get_default_source();
Description : Retrieves from the database the default source used for display purposes
Description : DEPRECATED - Retrieves from the database the default source used for display purposes
ReturnType : string
Exceptions : none
Caller : web
Status : At Risk
Status : DEPRECATED
=cut

sub get_default_source{
my $self = shift;

my $source_name;
my $sth = $self->prepare(qq{SELECT meta_value from meta where meta_key = ?
});
$sth->bind_param(1,'source.default_source',SQL_VARCHAR);
$sth->execute();
$sth->bind_columns(\$source_name);
$sth->fetch();
$sth->finish();
deprecate("The method 'get_default_source' is not used anymore. Please use the method 'get_all_sources' instead.\n");

return $source_name;
}
Expand Down

0 comments on commit daa532b

Please sign in to comment.