None available.
sub add_child
{ my ($self, $child) = @_;
$self->throw("No child argument to add_child call\n") if (!defined($child));
foreach my $c (@{$self->{_children}}) {
if ($c == $child) {
print "Already added child\n";
return;
}
}
push @{$self->{_children}}, $child; } |
sub add_parent
{ my ($self, $parent) = @_;
$self->throw("No parent argument to add_parent call\n") if (!defined($parent));
foreach my $p (@{$self->{_parents}}) {
if ($p == $parent) {
print "Already added parent\n";
return;
}
}
push @{$self->{_parents}}, $parent; } |
sub anal
{ my ($self,$anal) = @_;
if ($anal) {
$self->{_anal} = $anal;
}
return $self->{_anal}; } |
sub new
{ my ($class, @args) = @_;
my $self = bless {}, $class;
my ($anal) = $self->_rearrange([qw(ANAL)], @args);
$self->throw("No anal") unless defined $anal;
$self->anal($anal);
$self->{_parents} = [];
$self->{_children} = [];
return $self; } |