summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-05-12 12:33:44 -0500
committerJesse Luehrs <doy@tozt.net>2010-05-12 12:38:50 -0500
commitb746972e03adae326b05d48d28107e18b0567fe9 (patch)
tree34821112f8e0e769393b7d0d5c53a4607784db17 /lib
parenta2a2164aadab29b7424ea8f581413cf6a3b185b1 (diff)
downloadpackage-stash-xs-b746972e03adae326b05d48d28107e18b0567fe9.tar.gz
package-stash-xs-b746972e03adae326b05d48d28107e18b0567fe9.zip
what is this i don't even
Diffstat (limited to 'lib')
-rw-r--r--lib/Stash/Manip.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Stash/Manip.pm b/lib/Stash/Manip.pm
index 173ba13..a9f4bfa 100644
--- a/lib/Stash/Manip.pm
+++ b/lib/Stash/Manip.pm
@@ -205,7 +205,13 @@ sub get_package_symbol {
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') {