1#!/usr/bin/perl 2 3use strict; 4 5# For PRIVATE Module::Install extensions 6use lib 'private-lib'; 7 8use lib '.'; 9use inc::Module::Install; 10use Module::Install::GetProgramLocations; 11 12BEGIN { 13 my $commands = q{$(CP) t/mailboxes/*\\ * $(DISTVNAME)/t/mailboxes; $(CP) t/results/*\\ * $(DISTVNAME)/t/results}; 14 15 makemaker_args( 16 # To prevent MakeMaker from processing our old directory 17 NORECURS => 1, 18 # Copy files that have spaces in them. 19 dist => { PREOP => q{$(PERL) -I. "-MModule::Install::Admin" -e "dist_preop(q($(DISTVNAME)))"; } . $commands }, 20 ) 21} 22 23all_from('lib/Mail/Mbox/MessageParser.pm'); 24 25auto_set_bugtracker; 26githubmeta; 27 28# Perl 5.6 doesn't work with URI::Escape. We get an error about Exporter not exporting "import" 29perl_version '5.008'; 30 31configure_requires( 32 # Module::Install::Bugtracker needs this 33 'URI::Escape' => 0, 34); 35 36requires( 37 'FileHandle::Unget' => 0, 38 'Storable' => 0, 39); 40 41test_requires( 42 'Test::Compile' => 0, 43 'File::Slurper' => 0, 44 'Test::More' => 0, 45 'Text::Diff' => 0, 46 'File::Path' => 2.08, 47); 48 49check_optional('Benchmark::Timer' => '0.7100', 50 "Install Benchmark::Timer if you want to run \"make testspeed\"\n"); 51 52Add_Test_Target('testspeed', 't/speed.pl'); 53 54configure_programs(); 55 56license 'gpl2'; 57 58use_standard_tests; 59 60auto_license(holder => 'David Coppit'); 61 62no_index 'directory' => 'private-lib'; 63 64enable_verbose_cpan_testing(); 65 66realclean_files('inc'); 67 68WriteAll; 69 70# ---- Workaround for broken module ---- 71# https://rt.cpan.org/Ticket/Display.html?id=125772 72{ 73 package Module::Install::StandardTests; 74 75 sub write_standard_test_compile { 76 my $self = shift; 77 $self->write_test_file('000_standard__compile.t', q/ 78 BEGIN { 79 if ($^O eq 'MSWin32') { 80 require Test::More; 81 Test::More->import(skip_all => 82 "Test::Compile doesn't work properly on Windows"); 83 } else { 84 require Test::More; 85 Test::More->import(); 86 eval "use Test::Compile"; 87 Test::More->builder->BAIL_OUT( 88 "Test::Compile required for testing compilation") if $@; 89 all_pm_files_ok(); 90 } 91 } 92 /); 93 } 94} 95 96fix_sort_versions('inc/Sort/Versions.pm'); 97