perl-www.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. Index: WWW-Mechanize-1.12/Makefile.PL
  2. --- WWW-Mechanize-1.12/Makefile.PL.orig 2005-06-12 16:16:53 +0200
  3. +++ WWW-Mechanize-1.12/Makefile.PL 2005-06-12 16:20:23 +0200
  4. @@ -6,46 +6,7 @@
  5. use constant FLAG_SKIPMECHDUMP => File::Spec->catfile( "t", "SKIP-MECH-DUMP" );
  6. -# Much logic stolen fromm libwww-perl's Makefile.PL
  7. -my $skiplive = grep /--nolive/i, @ARGV;
  8. -my $skiplocal = grep /--nolocal/i, @ARGV;
  9. -
  10. -if ( !$skiplive ) {
  11. - require IO::Socket;
  12. - my $s = IO::Socket::INET->new(
  13. - PeerAddr => "www.google.com:80",
  14. - Timeout => 10,
  15. - );
  16. - if ($s) {
  17. - close($s);
  18. - $skiplive = 0;
  19. -
  20. - print <<EOT;
  21. -
  22. -Part of WWW::Mechanize's test suite is run live tests against Google.
  23. -Since it looks like you're connected to the Internet, these test will
  24. -be enabled. If you want to disable these tests, re-run Makefile.PL with
  25. -the --skiplive switch.
  26. -
  27. -EOT
  28. - } else {
  29. - print <<EOT;
  30. -
  31. - It seems that you are not directly connected to the Internet. Some
  32. - of the WWW::Mechanize tests interact with websites such as Google,
  33. - in addition to its own internal tests.
  34. -
  35. -EOT
  36. -
  37. - if ( prompt("Do you want to skip these tests?", "y") =~ /^y/i ) {
  38. - $skiplive = 1;
  39. - }
  40. - } # failed connect
  41. -}
  42. -
  43. my @tests = glob File::Spec->catfile( 't', '*.t' );
  44. -push( @tests, glob File::Spec->catfile( 't', 'local', '*.t' ) ) unless $skiplocal;
  45. -push( @tests, glob File::Spec->catfile( 't', 'live', '*.t' ) ) unless $skiplive;
  46. my $parms = {
  47. 'NAME' => 'WWW::Mechanize',
  48. @@ -85,33 +46,4 @@
  49. touch();
  50. }
  51. -eval { require LWP; };
  52. -if ($@ or ! LWP::Protocol::implementor('https') ) {
  53. - print <<EOT;
  54. -
  55. -It looks like you don't have SSL capability (like IO::Socket::SSL) installed.
  56. -You will not be able to process https:// URLs correctly.
  57. -
  58. -EOT
  59. -}
  60. -
  61. -my @missing;
  62. -my @nice = qw( Test::Pod Test::Memory::Cycle Test::Warn );
  63. -for my $nice ( @nice ) {
  64. - eval "require $nice";
  65. - push( @missing, $nice ) if $@;
  66. -}
  67. -
  68. -if ( @missing ) {
  69. - @missing = map { "\t$_\n" } @missing;
  70. - print <<EOT;
  71. -
  72. -WWW::Mechanize likes to have a lot of test modules for some of its tests.
  73. -The following are modules that would be nice to have, but not required.
  74. -
  75. -@missing
  76. -
  77. -EOT
  78. -}
  79. -
  80. WriteMakefile( %$parms );