{
my $foo = Package::Stash->new('Foo');
+ { local $TODO = $Package::Stash::IMPLEMENTATION eq 'PP'
+ ? "the pure perl implementation leaks here somehow"
+ : undef;
no_leaks_ok {
$foo->add_symbol('$scalar_init' => 1);
$foo->add_symbol('@array_init' => []);
$foo->add_symbol('&code_init' => sub { "foo" });
$foo->add_symbol('io_init' => Symbol::geniosym);
} "add_symbol doesn't leak";
+ }
is(exception {
is(Foo->code_init, 'foo', "sub installed correctly")
}, undef, "code_init exists");
}
{
+ local $TODO = ($Package::Stash::IMPLEMENTATION eq 'PP'
+ && $Carp::VERSION ge '1.17')
+ ? "Carp is leaky on 5.12.2 apparently?"
+ : undef;
my $foo = Package::Stash->new('Foo');
no_leaks_ok {
eval { $foo->get_or_add_symbol('&blorg') };
{
my $foo = Package::Stash->new('Foo');
+ { local $TODO = $Package::Stash::IMPLEMENTATION eq 'PP'
+ ? "the pure perl implementation leaks here somehow"
+ : undef;
no_leaks_ok {
$foo->add_symbol('$scalar_init' => 1);
$foo->add_symbol('@array_init' => []);
$foo->add_symbol('&code_init' => sub { "foo" });
$foo->add_symbol('io_init' => Symbol::geniosym);
} "add_symbol doesn't leak";
+ }
is(exception {
is(Foo->code_init, 'foo', "sub installed correctly")
}, undef, "code_init exists");
}
{
+ local $TODO = ($Package::Stash::IMPLEMENTATION eq 'PP'
+ && $Carp::VERSION ge '1.17')
+ ? "Carp is leaky on 5.12.2 apparently?"
+ : undef;
my $foo = Package::Stash->new('Foo');
no_leaks_ok {
eval { $foo->get_or_add_symbol('&blorg') };