1use strict; 2use warnings; 3use ExtUtils::MakeMaker; 4 5my $parms = { 6 NAME => 'Test::WWW::Mechanize', 7 AUTHOR => 'Andy Lester <andy@petdance.com>', 8 VERSION_FROM => 'Mechanize.pm', 9 ABSTRACT_FROM => 'Mechanize.pm', 10 PL_FILES => {}, 11 PREREQ_PM => { 12 'parent' => 0, 13 'Carp' => 0, 14 'Carp::Assert::More' => '1.16', 15 'HTML::Form' => 0, 16 'HTTP::Server::Simple' => '0.42', 17 'HTTP::Server::Simple::CGI' => 0, 18 'HTML::TokeParser' => 0, 19 'LWP' => 6.02, 20 'Test::Builder::Tester' => '1.09', 21 'Test::LongString' => '0.15', 22 'Test::More' => '0.96', # subtest() and done_testing() 23 'URI::file' => 0, 24 'WWW::Mechanize' => '1.68', 25 }, 26 dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, 27 clean => { FILES => 'Test-WWW-Mechanize-*' }, 28}; 29 30if ( $ExtUtils::MakeMaker::VERSION =~ /^\d\.\d\d$/ and $ExtUtils::MakeMaker::VERSION > 6.30 ) { 31 $parms->{LICENSE} = 'artistic_2'; 32} 33 34if ( $ExtUtils::MakeMaker::VERSION ge '6.46' ) { 35 $parms->{META_MERGE} = { 36 resources => { 37 license => 'https://opensource.org/licenses/artistic-license-2.0', 38 homepage => 'https://github.com/petdance/test-www-mechanize', 39 bugtracker => 'https://github.com/petdance/test-www-mechanize/issues', 40 repository => 'https://github.com/petdance/test-www-mechanize', 41 } 42 }; 43} 44if ( $ExtUtils::MakeMaker::VERSION ge '6.48' ) { 45 $parms->{MIN_PERL_VERSION} = 5.008; 46} 47 48my $module = 'HTML::Lint 2.20'; 49if ( not eval "use $module; 1;" ) { 50 print "You don't have $module installed, so cannot use autolinting.\n"; 51} 52 53WriteMakefile( %{$parms} ); 54 55 56sub MY::postamble { 57 return <<'MAKE_FRAG'; 58.PHONY: critic tags 59 60critic: 61 perlcritic -1 -q -profile perlcriticrc Mechanize.pm t/ 62 63tags: 64 ctags -f tags --recurse --totals \ 65 --exclude=blib \ 66 --exclude=.svn \ 67 --exclude='*~' \ 68 --languages=Perl --langmap=Perl:+.t \ 69 70MAKE_FRAG 71} 72