Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the File-Which CPAN distribution.

Report information
The Basics
Id: 99378
Status: resolved
Priority: 0/
Queue: File-Which

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc: PLICEASE [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.09
Fixed in: (no value)



Subject: dependencies: declare Test::More, Test::Script as test_requires
From Makefile.PL:

        'PREREQ_PM'    => {
                'Exporter'     => 0,
                'Getopt::Std'  => 0,
                'File::Spec'   => '0.60',
                'Test::More'   => '0.80',
                'Test::Script' => '1.05',
        },

This implies that Test::More and Test::Script are required at runtime.

The Makefile.PL should be upgraded to have more granular dependencies and declare Test::More and Test::Script dependencies only for the test phase.


-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/
Download (untitled) / with headers
text/plain 629b
This patch would address this ticket: diff --git a/Makefile.PL b/Makefile.PL index a9bd49c..9ba8eb5 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -10,9 +10,17 @@ WriteMakefile( 'Exporter' => 0, 'Getopt::Std' => 0, 'File::Spec' => '0.60', - 'Test::More' => '0.80', - 'Test::Script' => '1.05', + ($ExtUtils::MakeMaker::VERSION ge '6.34' ? ( + 'Test::More' => '0.80', + 'Test::Script' => '1.05', + ) : () ), }, + ($ExtUtils::MakeMaker::VERSION ge '6.34' ? ( + TEST_REQUIRES => { + 'Test::More' => '0.80', + 'Test::Script' => '1.05', + }, + ) : () ), 'EXE_FILES' => [ 'script/pwhich', ],
Download (untitled) / with headers
text/plain 632b
Pardon me there was a bug in my logic :) diff --git a/Makefile.PL b/Makefile.PL index a9bd49c..b372fa4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -10,9 +10,17 @@ WriteMakefile( 'Exporter' => 0, 'Getopt::Std' => 0, 'File::Spec' => '0.60', - 'Test::More' => '0.80', - 'Test::Script' => '1.05', + ($ExtUtils::MakeMaker::VERSION lt '6.34' ? ( + 'Test::More' => '0.80', + 'Test::Script' => '1.05', + ) : () ), }, + ($ExtUtils::MakeMaker::VERSION ge '6.34' ? ( + TEST_REQUIRES => { + 'Test::More' => '0.80', + 'Test::Script' => '1.05', + }, + ) : () ), 'EXE_FILES' => [ 'script/pwhich', ],
Download (untitled) / with headers
text/plain 264b
You also need this: WriteMakefile( ..., META_MERGE => { 'meta-spec' => { version => 2 }, dynamic_config => 0, }, ); ...in order to generate a correct META.json with prereqs under 'test' rather than 'build'.
Download (untitled) / with headers
text/plain 1.1k
How about this: diff --git a/Makefile.PL b/Makefile.PL index a9bd49c..3e7befb 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -10,9 +10,17 @@ WriteMakefile( 'Exporter' => 0, 'Getopt::Std' => 0, 'File::Spec' => '0.60', - 'Test::More' => '0.80', - 'Test::Script' => '1.05', + ($ExtUtils::MakeMaker::VERSION lt '6.34' ? ( + 'Test::More' => '0.80', + 'Test::Script' => '1.05', + ) : () ), }, + ($ExtUtils::MakeMaker::VERSION ge '6.34' ? ( + TEST_REQUIRES => { + 'Test::More' => '0.80', + 'Test::Script' => '1.05', + }, + ) : () ), 'EXE_FILES' => [ 'script/pwhich', ], @@ -22,4 +30,12 @@ WriteMakefile( ( $ExtUtils::MakeMaker::VERSION ge '6.31' ? ( LICENSE => 'perl', ) : () ), + + ( $ExtUtils::MakeMaker::VERSION ge '6.46' ? ( + META_MERGE => { + 'meta-spec' => { version => 2 }, + dynamic_config => 0, + }, + ) : () ), + );
Download (untitled) / with headers
text/plain 107b
another option would be to require a more recent version of MM, and remove all the version specific logic.
Download (untitled) / with headers
text/plain 159b
This will be fixed in 1.10. In addition Test::Script will be removed as a dependency in a later version, see: https://github.com/plicease/File-Which/issues/1


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.