2 if( $ENV{PERL_CORE} ) {
4 @INC = ('../lib', 'lib');
12 use Test::More tests => 6;
16 require ExtUtils::MM_Any;
19 return bless {@_}, 'ExtUtils::MM_Any';
24 DISTNAME => 'Foo-Bar',
27 "Foo::Bar" => 'lib/Foo/Bar.pm',
31 is_deeply [$mm->metafile_data], [
37 distribution_type => 'module',
39 configure_requires => {
40 'ExtUtils::MakeMaker' => 0,
43 'ExtUtils::MakeMaker' => 0,
47 directory => [qw(t inc)],
50 generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
52 url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
58 is_deeply [$mm->metafile_data({}, { no_index => { directory => [qw(foo)] } })], [
64 distribution_type => 'module',
66 configure_requires => {
67 'ExtUtils::MakeMaker' => 0,
70 'ExtUtils::MakeMaker' => 0,
74 directory => [qw(t inc foo)],
77 generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
79 url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
82 ], 'rt.cpan.org 39348';
88 DISTNAME => 'Foo-Bar',
97 is_deeply [$mm->metafile_data(
99 configure_requires => {
115 author => ['Some Guy'],
116 license => 'unknown',
117 distribution_type => 'script',
119 configure_requires => {
123 'ExtUtils::MakeMaker' => 0,
132 directory => [qw(t inc)],
136 generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
138 url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
148 # Test MIN_PERL_VERSION
151 DISTNAME => 'Foo-Bar',
154 "Foo::Bar" => 'lib/Foo/Bar.pm',
156 MIN_PERL_VERSION => 5.006,
159 is_deeply [$mm->metafile_data], [
164 license => 'unknown',
165 distribution_type => 'module',
167 configure_requires => {
168 'ExtUtils::MakeMaker' => 0,
171 'ExtUtils::MakeMaker' => 0,
179 directory => [qw(t inc)],
182 generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
184 url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
191 # Test MIN_PERL_VERSION
194 DISTNAME => 'Foo-Bar',
197 "Foo::Bar" => 'lib/Foo/Bar.pm',
199 MIN_PERL_VERSION => 5.006,
205 is_deeply [$mm->metafile_data], [
210 license => 'unknown',
211 distribution_type => 'module',
213 configure_requires => {
214 'ExtUtils::MakeMaker' => 0,
217 'ExtUtils::MakeMaker' => 0,
226 directory => [qw(t inc)],
229 generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
231 url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
237 # Test CONFIGURE_REQUIRES
240 DISTNAME => 'Foo-Bar',
242 CONFIGURE_REQUIRES => {
243 "Fake::Module1" => 1.01,
246 "Foo::Bar" => 'lib/Foo/Bar.pm',
250 is_deeply [$mm->metafile_data], [
255 license => 'unknown',
256 distribution_type => 'module',
258 configure_requires => {
259 'Fake::Module1' => 1.01,
262 'ExtUtils::MakeMaker' => 0,
266 directory => [qw(t inc)],
269 generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
271 url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
274 ],'CONFIGURE_REQUIRES';