}
{
- $foo_stash->add_symbol('%zork');
- ok(!$foo_stash->has_symbol('$zork'),
+ $foo_stash->add_symbol('%bare');
+ ok(!$foo_stash->has_symbol('$bare'),
"add_symbol with single argument doesn't vivify scalar slot");
+}
+
+{
+ $foo_stash->add_symbol('%zork', {});
my $syms = $foo_stash->get_all_symbols('HASH');
is($syms->{$symbol}, $foo_stash->get_symbol('%' . $symbol), '... got the right symbol');
}
- no warnings 'once';
is_deeply(
$syms,
- { zork => \%Foo::zork },
+ { zork => *{ $Foo::{zork} }{HASH} },
"got the right ones",
);
}
}
{
- $foo_stash->add_symbol('%zork');
- ok(!$foo_stash->has_symbol('$zork'),
+ $foo_stash->add_symbol('%bare');
+ ok(!$foo_stash->has_symbol('$bare'),
"add_symbol with single argument doesn't vivify scalar slot");
+}
+
+{
+ $foo_stash->add_symbol('%zork', {});
my $syms = $foo_stash->get_all_symbols('HASH');
is($syms->{$symbol}, $foo_stash->get_symbol('%' . $symbol), '... got the right symbol');
}
- no warnings 'once';
is_deeply(
$syms,
- { zork => \%Foo::zork },
+ { zork => *{ $Foo::{zork} }{HASH} },
"got the right ones",
);
}
}
{
- $foo_stash->add_symbol('%zork');
- ok(!$foo_stash->has_symbol('$zork'),
+ $foo_stash->add_symbol('%bare');
+ ok(!$foo_stash->has_symbol('$bare'),
"add_symbol with single argument doesn't vivify scalar slot");
+}
+
+{
+ $foo_stash->add_symbol('%zork', {});
my $syms = $foo_stash->get_all_symbols('HASH');
is($syms->{$symbol}, $foo_stash->get_symbol('%' . $symbol), '... got the right symbol');
}
- no warnings 'once';
is_deeply(
$syms,
- { zork => \%Foo::zork },
+ { zork => *{ $Foo::{zork} }{HASH} },
"got the right ones",
);
}