5 use lib "$FindBin::Bin/lib";
6 use Test::More tests => 10;
10 ok($foo = MyTest->new());
13 my @expected = qw(MyTest::Plugin::Foo);
14 ok(@plugins = sort $foo->plugins);
15 is_deeply(\@plugins, \@expected);
19 ok(@plugins = sort MyTest->plugins);
20 is_deeply(\@plugins, \@expected);
25 ok($foo = MyTestSub->new());
28 my @expected = qw(MyTest::Plugin::Foo);
29 ok(@plugins = sort $foo->plugins);
30 is_deeply(\@plugins, \@expected);
34 ok(@plugins = sort MyTestSub->plugins);
35 is_deeply(\@plugins, \@expected);
41 use Module::Pluggable only => [ "MyTest::Plugin::Foo" ];
46 return bless {}, $class;
53 use Module::Pluggable search_path => "MyTest::Plugin";
58 my $self = bless {}, $class;
60 $self->only(["MyTest::Plugin::Foo"]);