This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Module::Pluggable 3.7
[perl5.git] / t / Module_Pluggable / 10innerpack_inner.t
CommitLineData
3f7169a2
RGS
1#!perl -w
2
3use strict;
4use FindBin;
183ac38d 5use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
3f7169a2
RGS
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 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