use strict; use warnings; package Child; use Data::Dumper ; use base 'Parent' ; sub data { return { one => 1, two => 2 } }; 1; #### 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;