summaryrefslogtreecommitdiff
path: root/ext/Module-Pluggable/t/12onlyarray.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Module-Pluggable/t/12onlyarray.t')
-rw-r--r--ext/Module-Pluggable/t/12onlyarray.t65
1 files changed, 0 insertions, 65 deletions
diff --git a/ext/Module-Pluggable/t/12onlyarray.t b/ext/Module-Pluggable/t/12onlyarray.t
deleted file mode 100644
index a37e7771d2..0000000000
--- a/ext/Module-Pluggable/t/12onlyarray.t
+++ /dev/null
@@ -1,65 +0,0 @@
-#!perl -w
-
-use strict;
-use FindBin;
-use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
-use Test::More tests => 10;
-
-{
- my $foo;
- ok($foo = MyTest->new());
-
- my @plugins;
- my @expected = qw(MyTest::Plugin::Foo);
- ok(@plugins = sort $foo->plugins);
- is_deeply(\@plugins, \@expected);
-
- @plugins = ();
-
- ok(@plugins = sort MyTest->plugins);
- is_deeply(\@plugins, \@expected);
-}
-
-{
- my $foo;
- ok($foo = MyTestSub->new());
-
- my @plugins;
- my @expected = qw(MyTest::Plugin::Foo);
- ok(@plugins = sort $foo->plugins);
- is_deeply(\@plugins, \@expected);
-
- @plugins = ();
-
- ok(@plugins = sort MyTestSub->plugins);
- is_deeply(\@plugins, \@expected);
-}
-
-package MyTest;
-
-use strict;
-use Module::Pluggable only => [ "MyTest::Plugin::Foo" ];
-
-
-sub new {
- my $class = shift;
- return bless {}, $class;
-
-}
-
-package MyTestSub;
-
-use strict;
-use Module::Pluggable search_path => "MyTest::Plugin";
-
-
-sub new {
- my $class = shift;
- my $self = bless {}, $class;
-
- $self->only(["MyTest::Plugin::Foo"]);
-
- return $self;
-}
-1;
-