Adapt perlivp to the ext/ reorganisation for Compress modules
[p5sagit/p5-mst-13.2.git] / t / Module_Pluggable / 02works_taint.t
CommitLineData
3f7169a2 1#!perl -wT
2
3# NOTE: Module::Pluggable is going into core
4# and CORE tests can't modify @INC under taint
5# so this is a work around to make sure it
6# still works under taint checking.
7
8use strict;
9use Test::More tests => 5;
10
11my $foo;
12ok($foo = MyTest->new());
13
14my @plugins;
15my @expected = qw(Module::Pluggable::Object);
16ok(@plugins = sort $foo->plugins);
17
18
19ok(grep {/Module::Pluggable::Object/} @plugins, "Contains Module::Pluggable::Object");
20
21@plugins = ();
22
23ok(@plugins = sort MyTest->plugins);
24
25ok(grep {/Module::Pluggable::Object/} @plugins, "Contains Module::Pluggable::Object under class method");
26
27
28
29package MyTest;
30
31use strict;
32use Module::Pluggable search_path => 'Module::Pluggable';
33
34
35sub new {
36 my $class = shift;
37 return bless {}, $class;
38
39}
401;
41