| Summary | Included libraries | Package variables | Description | General documentation | Methods |
| WebCvs | Raw content |
| bar | No description | Code |
| data | No description | Code |
| bar | description | prev | next | Top |
my $self = shift;
print "\nExecuting method bar() in TestObject\n";
print "Throwing a Bio::TestException\n";
my $message = "A Test error";
# Bio::Root::Root::throw() will make use of Error.pm if present.
# The type of Error is specified with a -class parameter.
# If -class is not supplied, a Bio::Root::Exception is throw.
# In this case, the argument can consist of a simple string.
$self->throw( -class => 'Bio::TestException',
-text => $message );
print "Code within bar() below the throw that shouldn't be executed.\n";
}
1;}| data | description | prev | next | Top |
my ($self, $data) = @_; print "Setting test data ($data)\n" if $data; $self->{'data'} = $data if $data; return $self->{'data'}}
| AUTHOR | Top |