This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move MIME::Base64 from ext/ to cpan/
[perl5.git] / ext / Module-Pluggable / t / 12onlyrequire.t
1 #!perl -w
2 use strict;
3 use FindBin;
4 use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
5 use Test::More tests => 2;
6
7 my @packages = eval { Zot->_dist_types };
8 is($@, '',                "No warnings");
9 is(scalar(@packages), 0,  "Correctly only got 1 package");
10
11
12 package Zot;
13 use strict;
14 use Module::Pluggable (
15         sub_name => '_dist_types',
16         search_path => __PACKAGE__,
17         only => qr/Zot::\w+$/,
18         require => 1,
19     );
20
21 1;