use strict; use warnings; package Parent; use Data::Dumper ; sub new { my $proto = shift ; return bless {}, $proto } sub show { my $self = shift ; my $proto = ref $self ; print $proto::data ; print Dumper $proto::data } 1; #### use strict; use warnings; package Child; use base 'Parent' ; our $data = { one => 1, two => 2 } ; 1; #### #!/usr/bin/perl use strict; use warnings; use Child ; my $obj = Child->new(); $obj->show();