# NOTE: This is simply an example of a legacy array-based object. 
#       I do not recommend using it.
package Animal3;
use strict;

our $NAME_INDEX = 0;

sub new {
	my $class = shift;
	my $self = [];
	$self->[$NAME_INDEX] = shift;
	bless $self, $class;
	return $self;
}

sub name {
	my $self = shift;
	if (@_) { $self->[$NAME_INDEX] = shift }
	return $self->[$NAME_INDEX];
}

1;
