#### Foobar.pm ##### package Foobar; use Foo; use Bar; our @ISA = qw[Foo Bar]; sub new {bless {}, shift} sub init { my $self = shift; my %args = @_; $self->Foo::init(name => $args{name}) ->Bar::init(age => $args{age}); $self; } 1; #### Foo.pm #### package Foo; sub new {bless {}, shift} sub init { my $self = shift; my %args = @_; $self->{name} = $args{name}; $self; } sub name {$_[0]{name}} 1; #### Bar.pm #### package Bar; sub new {bless {}, shift} sub init { my $self = shift; my %args = @_; $self->{age} = $args{age}; $self; } sub age {$_[0]{age}} 1; #### foobar.pl #### use Foobar; my $o = Foobar->new->init(name => 'Tom', age => 23);