package mypkg; use vars qw (@ISA @EXPORT); @ISA =qw(Exporter); @EXPORT = qw( $GLOBALVARREF); our GLOBALVARREF = undef; sub new { GLOBALVARREF is intiliazed to $self. } sub get { return $someval{shift}; } pkg B; use mypkg; my $val = $GLOBALVARREF->get{'NAME'}; #my $val = $GLOBALVARREF->get{'NAME'} if defined($GLOBALVARREF)