5 use lib "$FindBin::Bin/lib";
6 use Test::More tests => 10;
10 ok($foo = MyTest->new());
13 my @expected = qw(MyTest::Plugin::Bar MyTest::Plugin::Quux::Foo);
14 ok(@plugins = sort $foo->plugins);
16 is_deeply(\@plugins, \@expected);
20 ok(@plugins = sort MyTest->plugins);
21 is_deeply(\@plugins, \@expected);
26 ok($foo = MyTestSub->new());
29 my @expected = qw(MyTest::Plugin::Bar MyTest::Plugin::Quux::Foo);
30 ok(@plugins = sort $foo->plugins);
32 is_deeply(\@plugins, \@expected);
36 ok(@plugins = sort MyTestSub->plugins);
37 is_deeply(\@plugins, \@expected);
43 use Module::Pluggable except => [ "MyTest::Plugin::Foo" ];
49 return bless {}, $class;
56 use Module::Pluggable search_path => "MyTest::Plugin";
61 my $self = bless {}, $class;
63 $self->except(["MyTest::Plugin::Foo"]);