Dog - just another Creature (Creature::Dog) (/examples).


Class-Classgen-classgen documentation Contained in the Class-Classgen-classgen distribution.

Index


Code Index:

NAME

Top

Dog - just another Creature (Creature::Dog) (/examples).

VERSION

Top

SYNOPSIS

Top

DESCRIPTION

Top

This dog will just think(), besides what an ordinary creature does.

ENVIRONMENT

Top

DIAGNOSTICS

Top

BUGS

Top

FILES

Top

SEE ALSO

Top

AUTHOR

Top

Name: Michael Schlueter

email: mschlue@cpan.org

COPYRIGHT

Top


Class-Classgen-classgen documentation Contained in the Class-Classgen-classgen distribution.

# --- Generated by classgen 3.0 on Son Apr  2 17:53:08 MEST 2000 ---

	package Dog;
	use Creature;
	@ISA=( "Creature" );
;
sub new {
	my $self = shift;
	my $type = ref($self)||$self;

	# instance-variables:
	my $a;	#justadummy

	$self=bless {
		_a		=>	$a,
	}, $type;
	$self->inherit_from($self->Creature::new());	# adapt when inheriting
	return $self;
}

# --- methods specific for this class ---------------------

sub specific {
	my ($self) = @_;
}

sub think {
	my ($self, $text) = @_;
	$self->make_noise( "{".$text."}" );
}

# --- inheritance methode -----------------------------------

sub inherit_from {
	my ($self, $base_blessed) = @_;
	my @l = keys %$base_blessed;
	foreach (@l) {
		$self->{$_} = $base_blessed->{$_};
	}
}

# --- accessor methods -----------------------------------

sub get_a {
	my ($self) = @_;
	$self->{_a};
}

# --- manipulator methods --------------------------------

sub clear_a {
	my ($self) = @_;
	my $v = $self->set_a(undef);

}

sub set_a {
	my ($self, $value) = @_;
	$self->{_a} = $value;
}

1;

__END__