5 use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
6 use Module::Pluggable::Object;
7 use File::Spec::Functions qw(catfile);
9 my ($dodgy_file) = (catfile($FindBin::Bin,"lib", "EditorJunk", "Plugin", "#Bar.pm#")=~/^(.*)$/);
10 unless (-f $dodgy_file) {
11 plan skip_all => "Can't handle plugin names with octothorpes\n";
19 ok($foo = EditorJunk->new());
22 my @expected = qw(EditorJunk::Plugin::Bar EditorJunk::Plugin::Foo);
23 ok(@plugins = sort $foo->plugins);
25 is_deeply(\@plugins, \@expected, "is deeply");
28 my $mpo = Module::Pluggable::Object->new(
29 package => 'EditorJunk',
31 include_editor_junk => 1,
34 @expected = ('EditorJunk::Plugin::.#Bar', 'EditorJunk::Plugin::Bar', 'EditorJunk::Plugin::Foo');
35 @plugins = sort $mpo->plugins();
36 is_deeply(\@plugins, \@expected, "is deeply");
43 use Module::Pluggable;
48 return bless {}, $class;