http://qs321.pair.com?node_id=988092


in reply to Symbolic reference with strict "refs"

In your specific example you have at least two options:

  1. 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
  2. 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.
HTH

_________
broquaint