package RSCard; our $dbhSC; sub new { my $class = shift; my $self = {}; return( bless($self, $class) ); } sub _init { return ($dbhSC); } 1; package RSCard::Creates; use base 'RSCard'; sub new { my $self = bless{}; my $dbhSC = $self->_init(); $self->{dbhSC} = $dbhSC; return($self); } sub something { my $self = shift; warn $self->{dbhSC} . "<<<<\n"; } 1; use lib '.'; use RSCard; use RSCard::Creates; $RSCard::dbhSC = 'test'; my $Creates = new RSCard::Creates; $Creates->something;