|
|
@@ -0,0 +1,84 @@
|
|
|
+Index: WWW-Mechanize-1.12/Makefile.PL
|
|
|
+--- WWW-Mechanize-1.12/Makefile.PL.orig 2005-06-12 16:16:53 +0200
|
|
|
++++ WWW-Mechanize-1.12/Makefile.PL 2005-06-12 16:20:23 +0200
|
|
|
+@@ -6,46 +6,7 @@
|
|
|
+
|
|
|
+ use constant FLAG_SKIPMECHDUMP => File::Spec->catfile( "t", "SKIP-MECH-DUMP" );
|
|
|
+
|
|
|
+-# Much logic stolen fromm libwww-perl's Makefile.PL
|
|
|
+-my $skiplive = grep /--nolive/i, @ARGV;
|
|
|
+-my $skiplocal = grep /--nolocal/i, @ARGV;
|
|
|
+-
|
|
|
+-if ( !$skiplive ) {
|
|
|
+- require IO::Socket;
|
|
|
+- my $s = IO::Socket::INET->new(
|
|
|
+- PeerAddr => "www.google.com:80",
|
|
|
+- Timeout => 10,
|
|
|
+- );
|
|
|
+- if ($s) {
|
|
|
+- close($s);
|
|
|
+- $skiplive = 0;
|
|
|
+-
|
|
|
+- print <<EOT;
|
|
|
+-
|
|
|
+-Part of WWW::Mechanize's test suite is run live tests against Google.
|
|
|
+-Since it looks like you're connected to the Internet, these test will
|
|
|
+-be enabled. If you want to disable these tests, re-run Makefile.PL with
|
|
|
+-the --skiplive switch.
|
|
|
+-
|
|
|
+-EOT
|
|
|
+- } else {
|
|
|
+- print <<EOT;
|
|
|
+-
|
|
|
+- It seems that you are not directly connected to the Internet. Some
|
|
|
+- of the WWW::Mechanize tests interact with websites such as Google,
|
|
|
+- in addition to its own internal tests.
|
|
|
+-
|
|
|
+-EOT
|
|
|
+-
|
|
|
+- if ( prompt("Do you want to skip these tests?", "y") =~ /^y/i ) {
|
|
|
+- $skiplive = 1;
|
|
|
+- }
|
|
|
+- } # failed connect
|
|
|
+-}
|
|
|
+-
|
|
|
+ my @tests = glob File::Spec->catfile( 't', '*.t' );
|
|
|
+-push( @tests, glob File::Spec->catfile( 't', 'local', '*.t' ) ) unless $skiplocal;
|
|
|
+-push( @tests, glob File::Spec->catfile( 't', 'live', '*.t' ) ) unless $skiplive;
|
|
|
+
|
|
|
+ my $parms = {
|
|
|
+ 'NAME' => 'WWW::Mechanize',
|
|
|
+@@ -85,33 +46,4 @@
|
|
|
+ touch();
|
|
|
+ }
|
|
|
+
|
|
|
+-eval { require LWP; };
|
|
|
+-if ($@ or ! 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 );
|
|
|
+-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 );
|