Commit | Line | Data |
3f7169a2 |
1 | #!perl -w |
2 | |
3 | use strict; |
4 | use FindBin; |
5 | use lib "$FindBin::Bin/lib"; |
6 | use Test::More tests => 3; |
7 | |
8 | my $foo; |
9 | ok($foo = MyTest->new()); |
10 | |
11 | my @plugins; |
12 | my @expected = qw(MyTest::Plugin::Bar MyTest::Plugin::Foo MyTest::Plugin::Quux::Foo); |
13 | ok(@plugins = sort $foo->foo); |
14 | is_deeply(\@plugins, \@expected); |
15 | |
16 | |
17 | |
18 | package MyTest; |
19 | |
20 | use strict; |
21 | use Module::Pluggable ( sub_name => 'foo'); |
22 | |
23 | |
24 | sub new { |
25 | my $class = shift; |
26 | return bless {}, $class; |
27 | |
28 | } |
29 | 1; |
30 | |