[qw(BEGIN bar baz foo quuuux quuux quux)],
"list_all_symbols",
);
- { local $TODO = $] < 5.010 ? "undef scalars aren't visible on 5.8" : undef;
+ { local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP')
+ ? "undef scalars aren't visible on 5.8, or from pure perl at all"
+ : undef;
is_deeply(
[sort $quuux->list_all_symbols('SCALAR')],
[qw(foo)],
}
my $stash = Package::Stash->new('Foo');
-{ local $TODO = $] < 5.010 ? "undef scalars aren't visible on 5.8" : undef;
+{ local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP')
+ ? "undef scalars aren't visible on 5.8, or from pure perl at all"
+ : undef;
ok($stash->has_symbol('$SCALAR'), '$SCALAR');
}
ok($stash->has_symbol('$SCALAR_WITH_VALUE'), '$SCALAR_WITH_VALUE');
@{$foo->get_or_add_symbol('@ISA')} = @super;
$foo->get_or_add_symbol('$glob');
} "get_or_add_symbol doesn't leak";
- { local $TODO = $] < 5.010 ? "undef scalars aren't visible on 5.8" : undef;
+ { local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP')
+ ? "undef scalars aren't visible on 5.8, or from pure perl at all"
+ : undef;
ok($foo->has_symbol('$glob'));
}
is(ref($foo->get_symbol('$glob')), 'SCALAR');
$foo->get_all_symbols('SCALAR');
$foo->get_all_symbols('CODE');
$blah->get_all_symbols('CODE');
- } "list_all_symbols doesn't leak";
+ } "get_all_symbols doesn't leak";
}
# mimic CMOP::create_anon_class
@{$foo->get_or_add_symbol('@ISA')} = @super;
$foo->get_or_add_symbol('$glob');
} "get_or_add_symbol doesn't leak";
- { local $TODO = $] < 5.010 ? "undef scalars aren't visible on 5.8" : undef;
+ { local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP')
+ ? "undef scalars aren't visible on 5.8, or from pure perl at all"
+ : undef;
ok($foo->has_symbol('$glob'));
}
is(ref($foo->get_symbol('$glob')), 'SCALAR');
$foo->get_all_symbols('SCALAR');
$foo->get_all_symbols('CODE');
$blah->get_all_symbols('CODE');
- } "list_all_symbols doesn't leak";
+ } "get_all_symbols doesn't leak";
}
# mimic CMOP::create_anon_class