package main; require 5.6.1; use strict; use warnings; use ExtUtils::MakeMaker qw( WriteMakefile prompt ); use File::Spec; use Getopt::Long; GetOptions( 'local!' => \my $local, 'mech-dump!' => \my $mechdump, 'all' => \my $all, ); if ( $all ) { $local = $mechdump = 1; } else { if ( not defined $local ) { $local = 1; } } my @tests = glob File::Spec->catfile( 't', '*.t' ); push( @tests, glob File::Spec->catfile( 't', 'local', '*.t' ) ) if $local; push( @tests, glob File::Spec->catfile( 't', 'mech-dump', '*.t' ) ) if $mechdump; my $parms = { NAME => 'WWW::Mechanize', VERSION_FROM => 'lib/WWW/Mechanize.pm', # finds $VERSION ABSTRACT_FROM => 'lib/WWW/Mechanize.pm', # retrieve abstract from module AUTHOR => 'Andy Lester ', PREREQ_PM => { 'Carp' => 0, 'File::Temp' => 0, 'FindBin' => 0, 'HTML::Form' => 1.038, 'HTML::HeadParser' => 0, 'HTML::Parser' => 3.33, 'HTML::TokeParser' => 2.28, 'HTTP::Daemon' => 0, 'HTTP::Request' => 1.30, 'HTTP::Status' => 0, 'LWP' => 5.802, 'LWP::UserAgent' => 2.024, 'Test::More' => 0.34, 'Test::LongString' => 0, 'URI' => 1.25, 'URI::URL' => 0, 'URI::file' => 0, }, test => { TESTS => join( ' ', @tests ) }, clean => { FILES => 'WWW-Mechanize-*' }, }; if ( not defined $mechdump ) { $mechdump = (prompt( 'Do you want to install the mech-dump utility?', 'y' ) =~ /^y/i ); print <{EXE_FILES} = [ 'bin/mech-dump' ]; $parms->{PREREQ_PM}->{'Getopt::Long'} = 0; $parms->{PREREQ_PM}->{'Pod::Usage'} = 0; } eval { require LWP; }; if (!$@) { if ( ! LWP::Protocol::implementor('https') ) { print <