my $namespace = $self->namespace;
if (!exists $namespace->{$name}) {
- if ($type eq 'ARRAY') {
+ # assigning to the result of this function like
+ # @{$stash->get_package_symbol('@ISA')} = @new_ISA
+ # makes the result not visible until the variable is explicitly
+ # accessed... in the case of @ISA, this might never happen
+ # for instance, assigning like that and then calling $obj->isa
+ # will fail. see t/005-isa.t
+ if ($type eq 'ARRAY' && $name ne 'ISA') {
$self->add_package_symbol($variable, []);
}
elsif ($type eq 'HASH') {