Commit | Line | Data |
3f7169a2 |
1 | #!perl -w |
2 | |
3 | use strict; |
4 | use FindBin; |
183ac38d |
5 | use lib (($FindBin::Bin."/lib")=~/^(.*)$/); |
3f7169a2 |
6 | use Test::More tests => 4; |
7 | |
8 | |
9 | |
10 | my $t = InnerTest->new(); |
11 | |
12 | my %plugins = map { $_ => 1 } $t->plugins; |
13 | |
14 | ok(keys %plugins, "Got some plugins"); |
15 | ok($plugins{'InnerTest::Plugin::Foo'}, "Got Foo"); |
16 | ok($plugins{'InnerTest::Plugin::Bar'}, "Got Bar - the inner package"); |
17 | ok($plugins{'InnerTest::Plugin::Quux'}, "Got Quux - the other inner package"); |
18 | |
19 | |
20 | |
21 | package InnerTest; |
22 | use strict; |
23 | use Module::Pluggable require => 1; |
24 | use base qw(Module::Pluggable); |
25 | |
26 | |
27 | sub new { |
28 | my $class = shift; |
29 | return bless {}, $class; |
30 | |
31 | } |
32 | |
33 | |
34 | 1; |
35 | |