#---------------------------------------- package Zoo::Animal; use strict; 1; sub new { my $class = shift; my $sref_oid = Zoo::Zoo->_gen_oid(); my $self = { _oid => $$sref_oid, @_ }; bless $self, $class; print "Animal initialised\n"; return $self; } #---------------------------------------- package Zoo::Camel; use strict; use base qw( Zoo::Animal ); sub new { my ( $class ) = @_; my $self = $class->SUPER::new( _type => 'camel', _color => 'grey', _legs => 4, _humps => 2, ); print "Camel initialised\n"; return $self; } #---------------------------------------- package Zoo::Lama; use strict; use base qw( Zoo::Animal ); sub new { my ( $class ) = @_; my $self = $class->SUPER::new( _type => 'lama', _color => 'white', _legs => 4, ); print "Lama initialised\n"; return $self; } #### package Zoo::Zoo; use UUID; use lib '.'; use base qw( Zoo::Animal Zoo::Camel Zoo::Lama );