fc7a213052cba54ef69fb81ce6f3f6cfaa0a6fd6
[p5sagit/p5-mst-13.2.git] / lib / Module / Pluggable / t / 10innerpack.t
1 #!perl -w
2
3 use strict;
4 use FindBin;
5 use lib "$FindBin::Bin/lib";
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