Move Module::Pluggable from ext/ to cpan/
[p5sagit/p5-mst-13.2.git] / cpan / Module-Pluggable / t / 10innerpack_override.t
CommitLineData
3f7169a2 1#!perl -w
2
3use strict;
4use FindBin;
183ac38d 5use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
3f7169a2 6use Test::More tests => 3;
7
8
9
10my $t = InnerTest->new();
11
12my %plugins = map { $_ => 1 } $t->plugins;
13
14ok(keys %plugins, "Got some plugins");
15ok($plugins{'InnerTest::Plugin::Foo'}, "Got Foo");
16ok($plugins{'InnerTest::Plugin::Bar'}, "Got Bar - the inner package");
17
18
19
20package InnerTest;
21use strict;
22use Module::Pluggable require => 0, inner => 1;
23use base qw(Module::Pluggable);
24
25
26sub new {
27 my $class = shift;
28 return bless {}, $class;
29
30}
31
32
331;
34