5 use Test::More tests => 2019;
7 use_ok('CleaneeTarget');
9 ok CleaneeTarget->can('IGNORED'), 'symbol in exception list still there';
10 ok CleaneeTarget->can('NOTAWAY'), 'symbol after import call still there';
11 ok !CleaneeTarget->can('AWAY'), 'normal symbol has disappeared';
13 ok !CleaneeTarget->can('x_foo'), 'explicitely removed disappeared (1/2)';
14 ok CleaneeTarget->can('x_bar'), 'not in explicit removal and still there';
15 ok !CleaneeTarget->can('x_baz'), 'explicitely removed disappeared (2/2)';
17 ok !CleaneeTarget->can('d_foo'), 'directly removed disappeared (1/2)';
18 ok CleaneeTarget->can('d_bar'), 'not in direct removal and still there';
19 ok !CleaneeTarget->can('d_baz'), 'directly removed disappeared (2/2)';
21 my @values = qw( 23 27 17 XFOO XBAR XBAZ 7 8 9 );
22 is(CleaneeTarget->summary->[ $_ ], $values[ $_ ], sprintf('testing sub in cleanee (%d/%d)', $_ + 1, scalar @values))
29 skip "This part of the test segfaults perl $] with both tie() and B::H::EOS."
30 . ' Actual code (e.g. DBIx::Class) works fine so did not investigate further',
31 2000 if "$]" < 5.008003;
37 if ($_[1] =~ /CleaneeTarget\/No(\d+)/) {
39 "package CleaneeTarget::No${1};",
40 "sub x_foo { 'XFOO' }",
41 "sub x_bar { 'XBAR' }",
43 "use CleaneeBridgeExplicit;",
48 return sub { return 0 unless @code; $_ = shift @code; 1; }
56 my $pkg = "CleaneeTarget::No${_}";
58 my @val = require "CleaneeTarget/No${_}.pm";
60 ok !$pkg->can('x_foo'), 'explicitely removed disappeared';
61 ok $pkg->can('x_bar'), 'not in explicit removal and still there';