directories structure: . |-- Word.pm |-- WordExposed | |-- Languages.pm | `-- LanguagesPrivate | |-- French.pm | `-- Italian.pm files: # foo.pl use strict; use warnings; use lib ('/path_to_Word_pm'); use Word; my $word = Word->new(); $word->set('apple','it'); # Word.pm package Word; use strict; use Class::Struct; use WordExposed::Languages; struct Word => { english => '$', language => '$', translation => '$', }; sub set { my $self = shift(); my $english = shift(); my $language = shift(); $self->english($english); $self->language($language); $self->_translate(); } 1; #### # Languages.pm package WordExposed::Languages; our @ISA = qw(Exporter); our @EXPORT = qw( _translate ); our @EXPORT_OK = qw(); sub _translate { my $self = shift(); if ($self->language eq 'fr') { $self->_traduction(); } elsif ($self->language eq 'it') { $self->_traduzione(); } } 1; # French.pm package WordExposed::LanguagesPrivate::French; our @ISA = qw(Exporter); our @EXPORT = qw( _traducion ); our @EXPORT_OK = qw(); sub _traducion { my $self = shift(); } 1; # Italian.pm package WordExposed::LanguagesPrivate::Italian; our @ISA = qw(Exporter); our @EXPORT = qw( _traduzione ); our @EXPORT_OK = qw(); sub _traduzione { my $self = shift(); } 1;