The reason this test failed is srictly the construct of the test itself, and
not part of namespace::clean's functionality. reqiure() in list-assign context
combined with an @INC coderef hook would result in visible stack corruption
as per http://www.nntp.perl.org/group/perl.perl5.porters/2003/10/msg83192.html
# some torture
-SKIP: {
-
- skip "This part of the test segfaults perl $] with both tie() and B::H::EOS."
- . ' Actual code (e.g. DBIx::Class) works fine so did not investigate further',
- 2000 if "$]" < 5.008003;
-
+{
local @INC = @INC;
my @code;
unshift @INC, sub {
for (1..1000) {
my $pkg = "CleaneeTarget::No${_}";
- my @val = require "CleaneeTarget/No${_}.pm";
+ require "CleaneeTarget/No${_}.pm";
ok !$pkg->can('x_foo'), 'explicitely removed disappeared';
ok $pkg->can('x_bar'), 'not in explicit removal and still there';