package my::model::subclass;
use strict;
use warnings;
use base qw/my::model/;
our %normal = ( top_level_key => { name1 => value1,
name2 => value2,
},
);
# the rest of the package...
####
package my::model;
use strict;
use warnings;
sub use_subclass_package_var {
my ($self, @cols) = @_;
my $normal = join '::', ref $self, 'normal';
foreach my $col (@cols) {
#
# I need help getting the next line to work properly
#
next unless exists eval { %{$normal{$col}} };
# the rest of the code
}
}
####
my $obj = my::model::subclass->new();
$obj->use_subclass_package_var('top_level_key');