In your specific example you have at least two options:
- Rummage through package stashes and globs e.g
@Foo::ISA = qw(Hello World);
use strict;
use feature 'say';
my $class = 'Foo';
my $isa = *{ $main::{"$class\::"}{ISA} }{ARRAY};
say "@$isa"; # Hello World
- Use the core package Symbol and make use of qualify_to_ref e.g
@Foo::ISA = qw(Hello World);
use strict;
use feature 'say';
use Symbol 'qualify_to_ref';
my $class = 'Foo';
my $isa = *{qualify_to_ref 'ISA', $class}{ARRAY};
say "@$isa"; # Hello World
The former won't work with nested packages whereas the latter will.