ensembl-analysis
Checker
Toolbar
Summary
Bio::EnsEMBL::Test::Checker
Package variables
No package variables defined.
Inherit
Synopsis
Module to define the interface for and implement the basic functionality of
the various Checker classes
Description
Methods
add_Error | Description | Code |
add_Warning | No description | Code |
check | No description | Code |
get_all_Errors | No description | Code |
get_all_Warnings | No description | Code |
has_Errors | No description | Code |
ignorewarnings | No description | Code |
output | No description | Code |
Methods description
Title : add_Error Usage : $obj->add_Error($newval) Function: Returns : value of errors |
Methods code
sub add_Error
{ my $self = shift;
if( @_ ) {
my $value = shift;
push @{$self->{_errors}},$value;
}
return @{$self->{_errors}}; } |
sub add_Warning
{ my $self = shift;
if( @_ ) {
my $value = shift;
push @{$self->{_warnings}},$value;
}
return @{$self->{_warnings}}; } |
sub check
{ my $self = shift;
$self->throw("Object did not provide the check method of the Checker interface"); } |
sub get_all_Errors
{ my $self = shift;
if (!defined($self->{_errors})) {
@{$self->{_errors}} = ();
}
return @{$self->{_errors}}; } |
sub get_all_Warnings
{ my $self = shift;
if (!defined($self->{_warnings})) {
@{$self->{_warnings}} = ();
}
return @{$self->{_warnings}}; } |
sub has_Errors
{ my $self = shift;
if (scalar($self->get_all_Errors) ||
(scalar($self->get_all_Warnings) && !$self->ignorewarnings)) {
return 1;
}
return 0; } |
sub ignorewarnings
{ my ( $self, $arg ) = @_;
if( defined $arg ) {
$self->{_ignorewarnings} = $arg;
}
return $self->{_ignorewarnings}; } |
sub output
{ my $self = shift;
if (scalar($self->get_all_Errors)) {
print "\nErrors:\n";
foreach my $error ($self->get_all_Errors()) {
print " " . $error;
}
}
if (scalar($self->get_all_Warnings)) {
print "\nWarnings:\n";
foreach my $warning ($self->get_all_Warnings) {
print " " . $warning;
}
} } |
General documentation
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _