Included libraries | Package variables | General documentation | Methods |
WebCvs | Raw content |
_display_stats | No description | Code |
_initialize | No description | Code |
destroy | No description | Code |
set_foo | No description | Code |
_display_stats | description | prev | next | Top |
my ($self, $OUT ) = @_; $self->SUPER::_display_stats($OUT); (defined $self->{'Foo'}) ? $self->{'Foo'}->display(-WHERE=>$OUT, -HEADER=>1) : ( printf( $OUT "%-15s: %s\n", 'Foo','undefined')); print $OUT "\n"; } ######################################}
1;
_initialize | description | prev | next | Top |
my($self, %param) = @_; $DEBUG && do{ printf ">>>> Initializing %s (%s) %s\n",$ID,ref($self),$param{-NAME}||'anon'; <STDIN>; }; #----------------------}
# DATA MEMBERS:
# Outerdat
# color
# bar
#----------------------
$self->SUPER::_initialize( %param ); my ($foodat) = $self->_rearrange([qw(FOODAT)], %param); $self->set_foo( @$foodat ); $self->index(); $DEBUG and printf "---> Initialized %s (%s) %s\n",$ID, ref($self), $self->name; } ###################################
destroy | description | prev | next | Top |
my $self = shift; if(ref($self->{'Foo'})) { $self->{'Foo'}->destroy; undef $self->{'Foo'}; } $self->SUPER::destroy(); } ###################################}
set_foo | description | prev | next | Top |
my ($self, %param) = @_; my $foo = undef; $DEBUG and print "$ID: set_foo()\n"; $param{-PARENT} = $self; eval { $foo = new Foo( %param ); }; if($@) { ## If Foo throws an exception, assimilate the exception as a warning}
## and add a note to it.
$self->warn(-MSG =>$@, -NOTE =>"${\$self->name()} can't build Foo object: Invalid object." ); } else { $self->{'Foo'} = $foo; } } ###################################