perlunifaq, uniintro: fix for 80 col display
[p5sagit/p5-mst-13.2.git] / cpan / Module-Pluggable / t / 10innerpack_onefile.t
1 #!perl -wT
2
3 use strict;
4 use Test::More tests => 2;
5 use Data::Dumper;
6
7 my $mc  = MyClass->new();
8 my $mc2 = MyClass2->new();
9
10
11 is_deeply([$mc->plugins],  [qw(MyClass::Plugin::MyPlugin)], "Got inner plugin");
12 is_deeply([$mc2->plugins], [],                              "Didn't get plugin");
13
14 package MyClass::Plugin::MyPlugin;
15 sub pretty { print "I am pretty" };
16
17 package MyClass;
18 use Module::Pluggable inner => 1;
19
20 sub new { return bless {}, $_[0] }
21
22 package MyClass2;
23 use Module::Pluggable search_path => "MyClass::Plugin", inner => 0;
24
25 sub new { return bless {}, $_[0] }
26 1;
27