otherwise you have to explicitly initialize a package global array or
hash with some value if you want to get a reference to its contents, if
it's empty on first access
my $namespace = $self->namespace;
# FIXME
- $self->add_package_symbol($variable)
- unless exists $namespace->{$name};
+ if (!exists $namespace->{$name}) {
+ my $initial = $type eq 'ARRAY' ? []
+ : $type eq 'HASH' ? {}
+ : \undef;
+ $self->add_package_symbol($variable, $initial)
+ }
my $entry_ref = \$namespace->{$name};