Permalink
Switch branches/tags
stable gitpan_version/1.73 gitpan_version/1.72_02 gitpan_version/1.72_01 gitpan_version/1.72 gitpan_version/1.71 gitpan_version/1.70 gitpan_version/1.69_01 gitpan_version/1.68 gitpan_version/1.67_01 gitpan_version/1.66 gitpan_version/1.64 gitpan_version/1.62 gitpan_version/1.60 gitpan_version/1.58 gitpan_version/1.56 gitpan_version/1.55_01 gitpan_version/1.54 gitpan_version/1.52 gitpan_version/1.51_03 gitpan_version/1.51_02 gitpan_version/1.51_01 gitpan_version/1.50 gitpan_version/1.49_01 gitpan_version/1.34 gitpan_version/1.32 gitpan_version/1.31_02 gitpan_version/1.31_01 gitpan_version/1.30 gitpan_version/1.29_01 gitpan_version/1.26 gitpan_version/1.24 gitpan_version/1.22 gitpan_version/1.21_04 gitpan_version/1.21_03 gitpan_version/1.21_02 gitpan_version/1.21_01 gitpan_version/1.20 gitpan_version/1.19_02 gitpan_version/1.18 gitpan_version/1.17_01 gitpan_version/1.16 gitpan_version/1.14 gitpan_version/1.13_01 gitpan_version/1.12 gitpan_version/1.11_02 gitpan_version/1.11_01 gitpan_version/1.10 gitpan_version/1.08 gitpan_version/1.06 gitpan_version/1.05_04 gitpan_version/1.05_03 gitpan_version/1.05_02 gitpan_version/1.05_01 gitpan_version/1.04 gitpan_version/1.03_02 gitpan_version/1.03_01 gitpan_version/1.02 gitpan_version/1.00 gitpan_version/0.76 gitpan_version/0.75_02 gitpan_version/0.75_01 gitpan_version/0.74 gitpan_version/0.73_03 gitpan_version/0.73_02 gitpan_version/0.73_01 gitpan_version/0.72 gitpan_version/0.71_02 gitpan_version/0.71_01 gitpan_version/0.70 gitpan_version/0.69_01 gitpan_version/0.66 gitpan_version/0.65 gitpan_version/0.64 gitpan_version/0.63 gitpan_version/0.62 gitpan_version/0.61 gitpan_version/0.60 gitpan_version/0.59 gitpan_version/0.58 gitpan_version/0.57 gitpan_version/0.56 gitpan_version/0.55 gitpan_version/0.54 gitpan_version/0.53 gitpan_version/0.52 gitpan_version/0.51 gitpan_version/0.50 gitpan_version/0.49 gitpan_version/0.48 gitpan_version/0.47 gitpan_version/0.46 gitpan_version/0.45 gitpan_version/0.44 gitpan_version/0.43 gitpan_version/0.42 gitpan_version/0.41 gitpan_version/0.40 gitpan_version/0.39 gitpan_version/0.38
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
130 lines (107 sloc) 3.69 KB
package main;
require 5.008000;
use strict;
use warnings;
use ExtUtils::MakeMaker qw( WriteMakefile );
use File::Spec;
use Getopt::Long;
my $live = 0;
my $local = 1;
GetOptions(
'live!' => \$live,
'local!' => \$local,
'all' => sub { print "All tests are on by default. This option is deprecated.\n" },
'mech-dump!' => sub { print "mech-dump is always installed now. This option is deprecated.\n" },
) or exit 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', 'live', '*.t' ) ) if $live;
push( @tests, glob File::Spec->catfile( 't', 'mech-dump', '*.t' ) );
my $parms = {
NAME => 'WWW::Mechanize',
VERSION_FROM => 'lib/WWW/Mechanize.pm', # finds $VERSION
ABSTRACT_FROM => 'lib/WWW/Mechanize.pm', # retrieve abstract from module
AUTHOR => 'Jesse Vincent <jesse@bestpractical.com>',
EXE_FILES => [ 'bin/mech-dump' ],
PREREQ_PM => {
'Carp' => 0,
'File::Temp' => 0,
'FindBin' => 0,
'Getopt::Long' => 0,
'HTML::Form' => 6.00,
'HTML::HeadParser' => 0,
'HTML::Parser' => 3.33,
'HTML::TokeParser' => 2.28,
'HTML::TreeBuilder' => 0,
'HTTP::Daemon' => 0,
'HTTP::Request' => 1.30,
'HTTP::Server::Simple' => 0.35,
'HTTP::Server::Simple::CGI' => 0,
'HTTP::Status' => 0,
'LWP' => 5.829,
'LWP::UserAgent' => 5.829,
'Pod::Usage' => 0,
'Test::More' => 0.34,
'Test::Warn' => 0.11,
'URI' => 1.36,
'URI::URL' => 0,
'URI::file' => 0,
},
test => { TESTS => join( ' ', @tests ) },
clean => { FILES => 'WWW-Mechanize-*' },
};
if ( $^O !~ /Win32/ ) {
}
if ( $ExtUtils::MakeMaker::VERSION ge '6.45_01' ) {
$parms->{META_MERGE} = {
resources => {
license => 'http://dev.perl.org/licenses/',
homepage => 'https://github.com/bestpractical/www-mechanize',
bugtracker => 'http://code.google.com/p/www-mechanize/issues/list',
Repository => 'https://github.com/bestpractical/www-mechanize',
MailingList => 'http://groups.google.com/group/www-mechanize-users',
}
};
$parms->{LICENSE} = 'perl';
}
if ( $ExtUtils::MakeMaker::VERSION ge '6.47_02' ) {
$parms->{MIN_PERL_VERSION} = 5.008;
}
eval { require LWP; };
if (!$@) {
if ( ! LWP::Protocol::implementor('https') ) {
print <<EOT;
It looks like you don't have SSL capability (like IO::Socket::SSL) installed.
You will not be able to process https:// URLs correctly.
EOT
}
}
my @missing;
my @nice = qw( Test::Pod Test::Memory::Cycle Test::Warn Test::Taint );
for my $nice ( @nice ) {
eval "require $nice";
push( @missing, $nice ) if $@;
}
if ( @missing ) {
@missing = map { "\t$_\n" } @missing;
print <<EOT;
WWW::Mechanize likes to have a lot of test modules for some of its tests.
The following are modules that would be nice to have, but not required.
@missing
EOT
}
WriteMakefile( %$parms );
sub MY::postamble {
return <<'MAKE_FRAG';
.PHONY: tags critic
tags:
ctags -f tags --recurse --totals \
--exclude=blib \
--exclude=.svn \
--exclude='*~' \
--languages=Perl --langmap=Perl:+.t \
critic:
perlcritic -1 -q -profile perlcriticrc bin/ lib/ t/
MAKE_FRAG
}
1;