make make_patchnum.sh (more) portable
[p5sagit/p5-mst-13.2.git] / t / Module_Pluggable / 02works.t
CommitLineData
3f7169a2 1#!perl -w
2
3use strict;
4use FindBin;
183ac38d 5use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
3f7169a2 6use Test::More tests => 5;
7
8my $foo;
9ok($foo = MyTest->new());
10
11my @plugins;
12my @expected = qw(MyTest::Plugin::Bar MyTest::Plugin::Foo MyTest::Plugin::Quux::Foo);
13ok(@plugins = sort $foo->plugins);
14
15
16
17is_deeply(\@plugins, \@expected, "is deeply");
18
19@plugins = ();
20
21ok(@plugins = sort MyTest->plugins);
22
23
24
25
26is_deeply(\@plugins, \@expected, "is deeply class");
27
28
29
30package MyTest;
31
32use strict;
33use Module::Pluggable;
34
35
36sub new {
37 my $class = shift;
38 return bless {}, $class;
39
40}
411;
42