Move Module::Pluggable from ext/ to cpan/
[p5sagit/p5-mst-13.2.git] / cpan / Module-Pluggable / t / 04acmepath_single.t
1 #!perl -w
2
3 use strict;
4 use FindBin;
5 use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
6 use Test::More tests => 3;
7
8
9 my $foo;
10 ok($foo = MyTest->new());
11
12 my @plugins;
13 my @expected = qw(Acme::MyTest::Plugin::Foo);
14 ok(@plugins = sort $foo->plugins);
15 is_deeply(\@plugins, \@expected);
16
17
18 package MyTest;
19 use File::Spec::Functions qw(catdir);
20 use strict;
21 use Module::Pluggable search_path => "Acme::MyTest::Plugin";
22
23
24 sub new {
25     my $class = shift;
26     return bless {}, $class;
27
28 }
29 1;
30