package Foo::Bar; use Carp; our @ISA = (); 1; sub new { my ($class, %opt) = @_; my $self = {}; bless ($self, $class); $self->init(%opt); return $self; } #### package Foo::Bar::Baz; use strict; use warnings; use Carp; our @ISA = qw( Foo::Bar ); 1; sub init { my $self = shift; my %opt = @_; # do the actual init for this specific class } #### #!/usr/bin/perl use strict; use warnings; use Foo::Bar::Baz; my $item = Foo::Bar::Baz->new();