bioperl-live Bar
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
Privates (from "my" definitions)
$ID = 'Bar'
Included modules
Bio::Root::Global qw ( :devel )
Bio::Root::Object ( )
Inherit
Bio::Root::Object
Synopsis
No synopsis!
Description
No description!
Methods
_display_stats
No description
Code
_initialize
No description
Code
_set_data
No description
Code
_set_flavor
No description
Code
data
No description
Code
Methods description
None available.
Methods code
_display_statsdescriptionprevnextTop
sub _display_stats {
    my ($self, $OUT ) = @_;

    $self->SUPER::_display_stats($OUT);

    printf( $OUT "%-15s: %d\n", 'DATA', $self->data());
    printf( $OUT "%-15s: %s\n", 'FLAVOR',$self->flavor());

    print $OUT "\n";
}


######################################
1;
}
_initializedescriptionprevnextTop
sub _initialize {
    my( $self, %param) = @_;
    
    $DEBUG and do{ print ">>>> Initializing $ID (${\ref($self)}) ",$param{-NAME}||'anon';<STDIN>};
    
    #----------------------
# DATA MEMBERS:
# bardat
# flavor
#----------------------
$self->SUPER::_initialize( %param ); my ($bar, $flavor) = $self->_rearrange([qw(BAR FLAVOR)], %param); $self->_set_data( $bar ); $self->_set_flavor( $flavor ); $self->index(); $DEBUG and print "---> Initialized $ID (${\ref($self)}) ",$self->name(),"\n"; } ###################################
}
_set_datadescriptionprevnextTop
sub _set_data {
    
    my ($self, $b ) = @_;	
    
    $b =~ /^\d+$/ or $self->throw("Bar data not defined or not an integer: $b");
    $self->{'bardat'} = $b;

}

###################################
}
_set_flavordescriptionprevnextTop
sub _set_flavor {
    
    my ($self, $f ) = @_;	
    
    $DEBUG and do{ print "Bar::_set_flavor() $f"; <STDIN>; };

    if($self->err) {
	print "$ID: has an error:\n";
	$self->print_err; <STDIN>;
    }

    defined $f || $self->throw("Flavor not defined.",
			       "All $ID objects must have a flavor.");

    $self->{'flavor'} = $f;
}

###################################
}
datadescriptionprevnextTop
sub data {
 my $self = shift;  $self->{'bardat'}
}
General documentation
No general documentation available.